Skip to content

Commit 236fdb0

Browse files
committed
Fix unambiguous array comparison
1 parent f0bdfc0 commit 236fdb0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

demosys/effects/effect.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,14 @@ def create_projection(self, fov=75.0, near=1.0, far=100.0, ratio=None):
4444
def create_transformation(self, rotation=None, translation=None):
4545
"""Convenient transformation method doing rotations and translation"""
4646
mat = None
47-
if rotation:
47+
if rotation is not None:
4848
x = matrix44.create_from_x_rotation(rotation[0])
4949
y = matrix44.create_from_y_rotation(rotation[1])
5050
z = matrix44.create_from_z_rotation(rotation[2])
5151
mat = matrix44.multiply(x, y)
5252
mat = matrix44.multiply(mat, z)
5353

54-
if translation:
54+
if translation is not None:
5555
trans = matrix44.create_from_translation(Vector3(translation))
5656
if mat is None:
5757
mat = trans

0 commit comments

Comments
 (0)