add type 'long' to expected types list in scale and scaleTo

This commit is contained in:
wmayer
2017-06-19 19:19:17 +02:00
parent 5f492a87db
commit 847a208868

View File

@@ -84,12 +84,12 @@ def equals(u,v):
def scale(u,scalar):
"scale(Vector,Float) - scales (multiplies) a vector by a factor"
typecheck ([(u,Vector), (scalar,(int,float))], "scale")
typecheck ([(u,Vector), (scalar,(long,int,float))], "scale")
return Vector(u.x*scalar, u.y*scalar, u.z*scalar)
def scaleTo(u,l):
"scaleTo(Vector,length) - scales a vector to a given length"
typecheck ([(u,Vector),(l,(int,float))], "scaleTo")
typecheck ([(u,Vector),(l,(long,int,float))], "scaleTo")
if u.Length == 0:
return Vector(u)
else: