From d0224dee32fb10de3751dffcc034bdae92fdf7fe Mon Sep 17 00:00:00 2001 From: Ryan Oldenburg Date: Fri, 4 Dec 2020 19:19:38 -0600 Subject: [PATCH] inline --- src/pixie/common.nim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pixie/common.nim b/src/pixie/common.nim index 838bafb..2ac7cb5 100644 --- a/src/pixie/common.nim +++ b/src/pixie/common.nim @@ -8,7 +8,7 @@ type at*: Vec2 to*: Vec2 -proc segment*(at, to: Vec2): Segment = +proc segment*(at, to: Vec2): Segment {.inline.} = result.at = at result.to = to @@ -27,7 +27,7 @@ proc intersects*(a, b: Segment, at: var Vec2): bool {.inline.} = return true return false -proc fractional*(v: float32): float32 = +proc fractional*(v: float32): float32 {.inline.} = ## Returns unsigned fraction part of the float. ## -13.7868723 -> 0.7868723 result = abs(v)