From b62fb9a8082f74c1cc186e0ca10db935d52907cb Mon Sep 17 00:00:00 2001 From: Sei Lisa Date: Wed, 11 Feb 2015 18:17:01 +0100 Subject: [PATCH] Make isstring and iskey stricter, plus one cosmetic change --- lslopt/lslbasefuncs.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lslopt/lslbasefuncs.py b/lslopt/lslbasefuncs.py index a06ef32..b0d5cbd 100644 --- a/lslopt/lslbasefuncs.py +++ b/lslopt/lslbasefuncs.py @@ -688,10 +688,10 @@ def isrotation(x): return type(x) == Quaternion and len(x) == 4 and type(x[0]) == type(x[1]) == type(x[2]) == type(x[3]) == float def isstring(x): - return type(x) in (unicode, Key) + return type(x) == unicode def iskey(x): - return type(x) in (Key, unicode) + return type(x) == Key def islist(x): return type(x) == list @@ -777,7 +777,7 @@ def llAxes2Rot(fwd, left, up): def llAxisAngle2Rot(axis, angle): assert isvector(axis) assert isfloat(angle) - axis = llVecNorm(axis, False) + axis = llVecNorm(axis, f32=False) if axis == ZERO_VECTOR: angle = 0. c = math.cos(ff(angle)*0.5)