Skip to content

Commit

Permalink
Fix math bug in octasphere.
Browse files Browse the repository at this point in the history
  • Loading branch information
prideout committed Nov 12, 2021
1 parent 1fc599f commit 10e008d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions par_octasphere.h
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ static float* paro_write_geodesic(float* dst, const float point_a[3], const floa
const float dtheta = angle_between_endpoints / num_segments;
float rotation_axis[3], quat[4];
paro_cross(rotation_axis, point_a, point_b);
paro_normalize(rotation_axis);
for (int point_index = 1; point_index < num_segments; point_index++, dst += 3) {
paro_quat_from_rotation(quat, rotation_axis, dtheta * point_index);
paro_quat_rotate_vector(dst, quat, point_a);
Expand Down

0 comments on commit 10e008d

Please # to comment.