diff options
author | Tavian Barnes <tavianator@gmail.com> | 2009-12-16 19:08:41 -0500 |
---|---|---|
committer | Tavian Barnes <tavianator@gmail.com> | 2009-12-16 19:08:41 -0500 |
commit | 728d06945f7cdee8e459d71f5dabbeeb9f1e1207 (patch) | |
tree | 130ec7180b658fdaff0245e1aff4463535836c85 /libdimension | |
parent | 78b2f11896f6bcda86a530f9d44278483872b43b (diff) | |
download | dimension-728d06945f7cdee8e459d71f5dabbeeb9f1e1207.tar.xz |
Fix argument order to copysign().
Diffstat (limited to 'libdimension')
-rw-r--r-- | libdimension/objects.c | 12 |
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)); } } |