Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DegreeRadian ¶
type DegreeRadian struct {
Degree float64 `json:"degree"` //角度
Radian float64 `json:"radian"` //弧度
X0 float64 `json:"x0"` //圆心坐标x
Y0 float64 `json:"y0"` //圆心坐标y
R float64 `json:"r"` //半径
}
func NewDegreeRadian ¶
func NewDegreeRadian(degree, radian, r float64) *DegreeRadian
func main(){
r := 50.0
a := 90.0
dr := NewDegreeRadian(a, 0, r)
r.Radian = dr.DegreeToRadian()
fmt.Printf("%f %f\n", dr.X1(), dr.Y1()) // 0.000000 50.000000
}
角度弧度互转
Click to show internal directories.
Click to hide internal directories.