fix sin/cos issue.

This commit is contained in:
treeform 2019-01-07 08:59:11 -08:00
parent c515641f68
commit d494ab1518

View file

@ -98,7 +98,7 @@ proc dir*(at: Vec2, to: Vec2): Vec2 =
result = (at - to).normalize() result = (at - to).normalize()
proc dir*(th: float32): Vec2 = proc dir*(th: float32): Vec2 =
vec2(sin(th), cos(th)) vec2(cos(th), sin(th))
proc dist*(at: Vec2, to: Vec2): float32 = proc dist*(at: Vec2, to: Vec2): float32 =
(at - to).length (at - to).length