Fix return type of cross product.

mod(Vector, Vector) was returning tuple, not Vector.
This commit is contained in:
Sei Lisa 2017-01-17 02:22:10 +01:00
parent 13f3c951e1
commit 6591b5dfd8

View file

@ -730,7 +730,9 @@ def mod(a, b, f32=True):
# cross product # cross product
a = v2f(a) a = v2f(a)
b = v2f(b) 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 raise ELSLTypeMismatch