19 lines
440 B
Text
19 lines
440 B
Text
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 ;
|
||
}
|