mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 23:28:48 +00:00
Fix #3726
This commit is contained in:
@@ -527,7 +527,7 @@ angle_from_quaternion :: proc{
|
|||||||
@(require_results)
|
@(require_results)
|
||||||
axis_from_quaternion_f16 :: proc "contextless" (q: Quaternionf16) -> Vector3f16 {
|
axis_from_quaternion_f16 :: proc "contextless" (q: Quaternionf16) -> Vector3f16 {
|
||||||
t1 := 1 - q.w*q.w
|
t1 := 1 - q.w*q.w
|
||||||
if t1 < 0 {
|
if t1 <= 0 {
|
||||||
return {0, 0, 1}
|
return {0, 0, 1}
|
||||||
}
|
}
|
||||||
t2 := 1.0 / math.sqrt(t1)
|
t2 := 1.0 / math.sqrt(t1)
|
||||||
@@ -536,7 +536,7 @@ axis_from_quaternion_f16 :: proc "contextless" (q: Quaternionf16) -> Vector3f16
|
|||||||
@(require_results)
|
@(require_results)
|
||||||
axis_from_quaternion_f32 :: proc "contextless" (q: Quaternionf32) -> Vector3f32 {
|
axis_from_quaternion_f32 :: proc "contextless" (q: Quaternionf32) -> Vector3f32 {
|
||||||
t1 := 1 - q.w*q.w
|
t1 := 1 - q.w*q.w
|
||||||
if t1 < 0 {
|
if t1 <= 0 {
|
||||||
return {0, 0, 1}
|
return {0, 0, 1}
|
||||||
}
|
}
|
||||||
t2 := 1.0 / math.sqrt(t1)
|
t2 := 1.0 / math.sqrt(t1)
|
||||||
@@ -545,7 +545,7 @@ axis_from_quaternion_f32 :: proc "contextless" (q: Quaternionf32) -> Vector3f32
|
|||||||
@(require_results)
|
@(require_results)
|
||||||
axis_from_quaternion_f64 :: proc "contextless" (q: Quaternionf64) -> Vector3f64 {
|
axis_from_quaternion_f64 :: proc "contextless" (q: Quaternionf64) -> Vector3f64 {
|
||||||
t1 := 1 - q.w*q.w
|
t1 := 1 - q.w*q.w
|
||||||
if t1 < 0 {
|
if t1 <= 0 {
|
||||||
return {0, 0, 1}
|
return {0, 0, 1}
|
||||||
}
|
}
|
||||||
t2 := 1.0 / math.sqrt(t1)
|
t2 := 1.0 / math.sqrt(t1)
|
||||||
|
|||||||
Reference in New Issue
Block a user