move fn
This commit is contained in:
parent
04e27d4122
commit
359f7726eb
1 changed files with 3 additions and 3 deletions
|
@ -97,12 +97,12 @@ proc dot*(a: Vec2, b: Vec2): float32 =
|
||||||
proc dir*(at: Vec2, to: Vec2): Vec2 =
|
proc dir*(at: Vec2, to: Vec2): Vec2 =
|
||||||
result = (at - to).normalize()
|
result = (at - to).normalize()
|
||||||
|
|
||||||
proc dist*(at: Vec2, to: Vec2): float32 =
|
|
||||||
(at - to).length
|
|
||||||
|
|
||||||
proc dir*(th: float32): Vec2 =
|
proc dir*(th: float32): Vec2 =
|
||||||
vec2(sin(th), cos(th))
|
vec2(sin(th), cos(th))
|
||||||
|
|
||||||
|
proc dist*(at: Vec2, to: Vec2): float32 =
|
||||||
|
(at - to).length
|
||||||
|
|
||||||
proc lerp*(a: Vec2, b: Vec2, v: float32): Vec2 =
|
proc lerp*(a: Vec2, b: Vec2, v: float32): Vec2 =
|
||||||
a * (1.0 - v) + b * v
|
a * (1.0 - v) + b * v
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue