mirror of
https://github.com/louisleroy5/trnslator.git
synced 2024-12-22 23:55:56 -05:00
Test angle()
Increase coverage
This commit is contained in:
parent
67d4afff55
commit
c71bf29fd7
@ -33,4 +33,14 @@ def test_float_round(config):
|
|||||||
assert float_num == 40.2
|
assert float_num == 40.2
|
||||||
|
|
||||||
|
|
||||||
|
def test_angle(v1, v2, acute=False):
|
||||||
|
# Calculate the angle between 2 vectors
|
||||||
|
# Polygon1 & vector1
|
||||||
|
poly1 = Polygon3D(
|
||||||
|
[(215.5, 5.0, 0.5), (215.5, 5.0, 2.0), (217.0, 5.0, 2.0), (217.0, 5.0, 0.5)]
|
||||||
|
)
|
||||||
|
v1 = poly1.normal_vector
|
||||||
|
v2 = v1
|
||||||
|
angle = utils.angle(v1, v2, acute=False)
|
||||||
|
|
||||||
|
assert angle == 2 * np.pi
|
||||||
|
Loading…
Reference in New Issue
Block a user