aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pcardpt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pcardpt.c b/pcardpt.c
index d74fe39..873479b 100644
--- a/pcardpt.c
+++ b/pcardpt.c
@@ -89,7 +89,7 @@ QueryDatabase(Vec position, int *hitType)
Vec o;
o = vadd(f, vmul(curves[i], -1));
- distance = min(distance, o.x > 0? abs(sqrt(vdot(o, o)) - 2): (o.y += o.y > 0? -2: 2, sqrt(vdot(o, o))));
+ distance = min(distance, o.x > 0? fabs(sqrt(vdot(o, o)) - 2): (o.y += o.y > 0? -2: 2, sqrt(vdot(o, o))));
}
distance = pow(pow(distance, 8) + pow(position.z, 8), 0.125) - 0.5;
*hitType = HIT_LETTER;
@@ -105,7 +105,7 @@ QueryDatabase(Vec position, int *hitType)
BoxTest(position, V(-25,17,-25), V(25,20,25))
),
BoxTest(/* Ceiling "planks" spaced 8 units apart. */
- V(fmod(abs(position.x), 8),
+ V(fmod(fabs(position.x), 8),
position.y,
position.z),
V(1.5,18.5,-25),