lt-core/lt-stdlib/angle.lt

20 lines
440 B
Text
Raw Normal View History

2024-06-11 15:17:58 +02:00
export {
let angle-normalize =
λ a : Angle
~ Degree
~ _0,360
~ _360
~ _2^64
~ machine.UInt64
~ machine.Word
↦ Angle~Degree~_0,360~_360: machine.UInt64.rem a 360;
let angle-degree-to-turns =
λ a : Angle
~ Degree
~ _0,360
~
~ machine.Float64
↦ f/ a 360 ;
}