fix sin/cos issue.
This commit is contained in:
parent
c515641f68
commit
d494ab1518
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue