formatting

This commit is contained in:
Ryan Oldenburg 2020-11-29 17:03:08 -06:00
parent 159c17bf7d
commit 9951eb0d0a

View file

@ -8,9 +8,7 @@ proc between*(value, min, max: float32): bool =
proc sign*(v: float32): float32 =
## Returns the sign of a number, -1 or 1.
if v >= 0:
return 1.0
return -1.0
if v >= 0: 1.0 else: -1.0
proc quantize*(v: float32, n: float32): float32 =
## Makes v be multipe of n. Rounding to integer quantize by 1.0.
@ -1214,7 +1212,8 @@ proc length*(q: Quat): float32 =
q.w * q.w +
q.x * q.x +
q.y * q.y +
q.z * q.z)
q.z * q.z
)
proc normalize*(q: Quat): Quat =
var m = q.length