mirror of
https://github.com/snowykami/mbcp.git
synced 2026-01-24 20:52:20 +00:00
🐛 fix ε accuracy
This commit is contained in:
@@ -12,6 +12,8 @@ import logging
|
||||
|
||||
from mbcp.mp_math.line import Line3
|
||||
from mbcp.mp_math.plane import Plane3
|
||||
from mbcp.mp_math.point import Point3
|
||||
from mbcp.mp_math.vector import Vector3
|
||||
|
||||
|
||||
class TestPlane3:
|
||||
@@ -20,10 +22,10 @@ class TestPlane3:
|
||||
"""
|
||||
测试平面的交线
|
||||
"""
|
||||
correct_ans = Line3(4, 3, 1, 1)
|
||||
correct_ans = Line3(Point3(-3, 2, 5), Vector3(4, 3, 1))
|
||||
|
||||
pl1 = Plane3(1, 0, -4, 23)
|
||||
pl2 = Plane3(2, -1, -5, 33)
|
||||
actual_ans = pl1.cal_intersection_line3(pl2)
|
||||
actual_ans = pl1 & pl2 # 平面交线
|
||||
logging.info(f"正确答案:{correct_ans} 实际答案:{actual_ans}")
|
||||
assert actual_ans == correct_ans
|
||||
|
||||
Reference in New Issue
Block a user