TESTS: add getAngleProp7

This commit is contained in:
hasufell 2014-12-17 23:21:48 +01:00
parent 48fb68355b
commit 3727ae620f
No known key found for this signature in database
GPG Key ID: 220CD1C5BDEED020
1 changed files with 7 additions and 0 deletions

View File

@ -142,6 +142,13 @@ getAngleProp6 (Positive v1) (Positive v2)
= getAngle v1 v2 == getAngle v2 v1
-- Angle between two identical vectors. We can't check against 0
-- because of sqrt in vecLength.
getAngleProp7 :: PosRoundR2 -> Bool
getAngleProp7 (PosRoundR2 v)
= getAngle v v < 0.0001 || isNaN (getAngle v v)
-- commutative
scalarProdProp1 :: Vec -> Vec -> Bool
scalarProdProp1 v1 v2 = v1 `scalarProd` v2 == v2 `scalarProd` v1