Fix conversion from float to quaternion

This commit is contained in:
gingerBill
2021-12-31 23:20:14 +00:00
parent bdf66bb1e1
commit 0d7cb02386
3 changed files with 16 additions and 25 deletions
+2 -2
View File
@@ -103,10 +103,10 @@ max :: proc{max_single, max_double, max_triple}
abs :: proc(a: $T) -> (out: T) where IS_NUMERIC(ELEM_TYPE(T)) {
when IS_ARRAY(T) {
for i in 0..<len(T) {
out[i] = builtin.abs(a[i])
out[i] = auto_cast builtin.abs(a[i])
}
} else {
out = builtin.abs(a)
out = auto_cast builtin.abs(a)
}
return
}