-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Description
func DegreesToAngle(degrees float32) byte {
return byte(math.Round(float64(degrees) * (256.0 / 360.0)))
}
func AngleToDegrees(angle byte) float32 {
return float32(angle) * (360.0 / 256.0)
}
I think it should be degrees to radians and radians to degrees. I mean the ratio will work itself out to the same value, but what's the point of that thing. Shouldn't it be pi/180 and 180/pi?
Metadata
Metadata
Assignees
Labels
No labels