Skip to content

Commit ae59c5f

Browse files
authored
fix vector2_extended example
there 2 reason it didn't work before First the Attribute `pyray.Matrix2x2` doesn't exist. Second the function `pyray.vector2_transform(v, mat)` prameter `mat` is Matrix 4x4 not 2x2 . And that's it :]
1 parent 48bcc23 commit ae59c5f

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

examples/extra/vector2_extended.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,6 @@ def zero():
255255

256256
print("Rotate:", v1.rotate(45))
257257

258-
# I don't know why this not work
259-
# mat = Matrix2x2(1, 0, 0, 1)
260-
# print("Transform:", v1.transform(mat))
258+
# now it work. :D
259+
mat = matrix_identity() # Matrix 4x4 [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]
260+
print("Transform:", v1.transform(mat)) # (3.0, 4.0)

0 commit comments

Comments
 (0)