Cleanup
This commit is contained in:
@@ -38,6 +38,7 @@ a *.*.* (V3 x2 y2 z2) =
|
||||
in V3 x y z
|
||||
|
||||
crossProd :: Point3 -> Point3 -> Point3
|
||||
{-# INLINE crossProd #-}
|
||||
crossProd (V3 x y z) (V3 a b c) = V3
|
||||
( y * c - z * b)
|
||||
( z * a - x * c)
|
||||
@@ -109,18 +110,16 @@ orderAround3 v ps = sortOn (argV . prj) ps
|
||||
vCen3 :: [Point3] -> Point3
|
||||
vCen3 ps = (1 / fromIntegral (length ps)) *.*.* foldr (+.+.+) (V3 0 0 0) ps
|
||||
|
||||
dotV3
|
||||
:: Point3
|
||||
-> Point3
|
||||
-> Float
|
||||
dotV3 :: Point3 -> Point3 -> Float
|
||||
dotV3 (V3 x y z) (V3 a b c) = x*a + y*b + z*c
|
||||
|
||||
projV3
|
||||
:: Point3
|
||||
-> Point3
|
||||
-> Point3
|
||||
projV3 = undefined
|
||||
angleVV3 :: Point3 -> Point3 -> Float
|
||||
angleVV3 a b
|
||||
| a == b = 0
|
||||
| otherwise = acos $ dotV3 a b / (magV3 a * magV3 b)
|
||||
|
||||
projV3 :: Point3 -> Point3 -> Point3
|
||||
projV3 = undefined
|
||||
|
||||
onXY :: (Point2 -> Point2) -> Point3 -> Point3
|
||||
onXY f (V3 x y z) = V3 x' y' z
|
||||
|
||||
Reference in New Issue
Block a user