This commit is contained in:
2026-03-24 09:38:32 +00:00
parent 832bebb597
commit be2f7160ba
13 changed files with 43 additions and 46 deletions
+11 -11
View File
@@ -45,11 +45,11 @@ crossProd (V3 x y z) (V3 a b c) = V3
( z * a - x * c)
( x * b - y * a)
rotate3 :: Float -> Point3 -> Point3
{-# INLINE rotate3 #-}
rotate3 a (V3 x y z) = V3 x' y' z
where
(V2 x' y') = rotateV a (V2 x y)
--rotate3 :: Float -> Point3 -> Point3
--{-# INLINE rotate3 #-}
--rotate3 a (V3 x y z) = V3 x' y' z
-- where
-- (V2 x' y') = rotateV a (V2 x y)
rotate3z :: Float -> Point3 -> Point3
{-# INLINE rotate3z #-}
@@ -124,10 +124,10 @@ angleVV3 a b
| a == b = 0
| otherwise = acos $ dotV3 a b / (magV3 a * magV3 b)
projV3 :: Point3 -> Point3 -> Point3
projV3 = undefined
--projV3 :: Point3 -> Point3 -> Point3
--projV3 = undefined
onXY :: (Point2 -> Point2) -> Point3 -> Point3
onXY f (V3 x y z) = V3 x' y' z
where
V2 x' y' = f (V2 x y)
--onXY :: (Point2 -> Point2) -> Point3 -> Point3
--onXY f (V3 x y z) = V3 x' y' z
-- where
-- V2 x' y' = f (V2 x y)