This commit is contained in:
parent
b11891e6ec
commit
98f8485ff0
|
@ -422,7 +422,7 @@ proc toRadians*[T: SomeFloat](deg: T): T =
|
|||
|
||||
proc toDegrees*[T: SomeFloat](rad: T): T =
|
||||
## Convert radians to degrees.
|
||||
fixAngle(180.0 * rad / PI)
|
||||
180.0 * rad / PI
|
||||
|
||||
proc toRadians*(deg: SomeInteger): float32 =
|
||||
## Convert degrees to radians.
|
||||
|
|
|
@ -899,3 +899,8 @@ block:
|
|||
doAssert vec4(uvec4(17, 18, 19, 20)) == vec4(17, 18, 19, 20)
|
||||
doAssert ivec4(uvec4(21, 22, 23, 24)) == ivec4(21, 22, 23, 24)
|
||||
doAssert uvec4(ivec4(25, 26, 27, 28)) == uvec4(25, 26, 27, 28)
|
||||
|
||||
block:
|
||||
# Test for https://github.com/treeform/vmath/issues/44
|
||||
doAssert PI.toDegrees() == 180
|
||||
doAssert (PI*2).toDegrees() == 360
|
||||
|
|
Loading…
Reference in a new issue