Rads
Converts an angle from degrees to radians.
- Use
math.Piand the degree to radian formula to convert the angle from degrees to radians.
import "math"
func Rads(d float64) float64 {
return d * math.Pi / 180.0
}Rads(90.0) // ~1.5708Converts an angle from degrees to radians.
math.Pi and the degree to radian formula to convert the angle from degrees to radians.import "math"
func Rads(d float64) float64 {
return d * math.Pi / 180.0
}Rads(90.0) // ~1.5708