add some mathematical method for object Segment3

This commit is contained in:
2024-08-07 00:54:13 +08:00
parent b4d5da5fc3
commit edc6a5ddaf
7 changed files with 243 additions and 24 deletions

View File

@ -8,15 +8,15 @@ Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved
@File : test_vector.py
@Software: PyCharm
"""
from mcpe.mp_math.vector import Vector3
from mcpe.mp_math.point import Point3
from mbcp.mp_math.vector import Vector3
from mbcp.mp_math.point import Point3
def test_v():
v1 = Vector3(1, 2, 3)
v2 = Vector3(4, 5, 6)
v3 = v1 + v2
assert v3.x == 5
assert v3.y == 7
assert v3.z == 9
assert v3._x == 5
assert v3._y == 7
assert v3._z == 9
print("test_v 1111passed")