summaryrefslogtreecommitdiffstats
path: root/libdimension
diff options
context:
space:
mode:
Diffstat (limited to 'libdimension')
-rw-r--r--libdimension/objects.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/libdimension/objects.c b/libdimension/objects.c
index 0a88561..3470506 100644
--- a/libdimension/objects.c
+++ b/libdimension/objects.c
@@ -132,7 +132,7 @@ dmnsn_cube_intersection_fn(const dmnsn_object *cube, dmnsn_line line)
&& t_temp >= 0.0 && (t < 0.0 || t_temp < t))
{
t = t_temp;
- normal = dmnsn_new_vector(-copysign(line.n.x, 1.0), 0.0, 0.0);
+ normal = dmnsn_new_vector(-copysign(1.0, line.n.x), 0.0, 0.0);
}
/* x = 1.0 */
@@ -142,7 +142,7 @@ dmnsn_cube_intersection_fn(const dmnsn_object *cube, dmnsn_line line)
&& t_temp >= 0.0 && (t < 0.0 || t_temp < t))
{
t = t_temp;
- normal = dmnsn_new_vector(-copysign(line.n.x, 1.0), 0.0, 0.0);
+ normal = dmnsn_new_vector(-copysign(1.0, line.n.x), 0.0, 0.0);
}
}
@@ -154,7 +154,7 @@ dmnsn_cube_intersection_fn(const dmnsn_object *cube, dmnsn_line line)
&& t_temp >= 0.0 && (t < 0.0 || t_temp < t))
{
t = t_temp;
- normal = dmnsn_new_vector(0.0, -copysign(line.n.y, 1.0), 0.0);
+ normal = dmnsn_new_vector(0.0, -copysign(1.0, line.n.y), 0.0);
}
/* y = 1.0 */
@@ -164,7 +164,7 @@ dmnsn_cube_intersection_fn(const dmnsn_object *cube, dmnsn_line line)
&& t_temp >= 0.0 && (t < 0.0 || t_temp < t))
{
t = t_temp;
- normal = dmnsn_new_vector(0.0, -copysign(line.n.y, 1.0), 0.0);
+ normal = dmnsn_new_vector(0.0, -copysign(1.0, line.n.y), 0.0);
}
}
@@ -176,7 +176,7 @@ dmnsn_cube_intersection_fn(const dmnsn_object *cube, dmnsn_line line)
&& t_temp >= 0.0 && (t < 0.0 || t_temp < t))
{
t = t_temp;
- normal = dmnsn_new_vector(0.0, 0.0, -copysign(line.n.z, 1.0));
+ normal = dmnsn_new_vector(0.0, 0.0, -copysign(1.0, line.n.z));
}
/* z = 1.0 */
@@ -186,7 +186,7 @@ dmnsn_cube_intersection_fn(const dmnsn_object *cube, dmnsn_line line)
&& t_temp >= 0.0 && (t < 0.0 || t_temp < t))
{
t = t_temp;
- normal = dmnsn_new_vector(0.0, 0.0, -copysign(line.n.z, 1.0));
+ normal = dmnsn_new_vector(0.0, 0.0, -copysign(1.0, line.n.z));
}
}