Axis should be valid for an identity quaternion from linalg.angle_axis_from_quaternion.
I'm not familiar enough with the math to know what value makes sense here. Maybe 0,0,0 or 1,0,0 or something else. But I would expect an identity quaternion to still have a valid axis.
Current Behavior
Axis is [NaN, NaN, NaN] for identity quaternion from linalg.angle_axis_from_quaternion
Failure Information (for bugs)
Steps to Reproduce
Here's a minimal program that reproduces the issue:
package main
import "core:fmt"
import la "core:math/linalg"
main :: proc() {
angle, axis := la.angle_axis_from_quaternion(la.QUATERNIONF32_IDENTITY)
fmt.println(angle)
fmt.println(axis)
}
My current workaround is to wrap angle_axis_from_quaternion in my own function that checks if the value is an identity quaternion and return axis of {0,0,0}.
Context
Expected Behavior
Axis should be valid for an identity quaternion from
linalg.angle_axis_from_quaternion
.I'm not familiar enough with the math to know what value makes sense here. Maybe
0,0,0
or1,0,0
or something else. But I would expect an identity quaternion to still have a valid axis.Current Behavior
Axis is
[NaN, NaN, NaN]
for identity quaternion fromlinalg.angle_axis_from_quaternion
Failure Information (for bugs)
Steps to Reproduce
Here's a minimal program that reproduces the issue: