Fix return type of cross product.
mod(Vector, Vector) was returning tuple, not Vector.
This commit is contained in:
@@ -730,7 +730,9 @@ def mod(a, b, f32=True):
|
||||
# cross product
|
||||
a = v2f(a)
|
||||
b = v2f(b)
|
||||
return F32((a[1]*b[2]-a[2]*b[1], a[2]*b[0]-a[0]*b[2], a[0]*b[1]-a[1]*b[0]), f32)
|
||||
return Vector(F32((a[1]*b[2]-a[2]*b[1],
|
||||
a[2]*b[0]-a[0]*b[2],
|
||||
a[0]*b[1]-a[1]*b[0]), f32))
|
||||
|
||||
raise ELSLTypeMismatch
|
||||
|
||||
|
||||
Reference in New Issue
Block a user