{-# LANGUAGE DataKinds
, DeriveDataTypeable
, DeriveGeneric
, DerivingStrategies
, GeneralizedNewtypeDeriving
, TypeFamilies
#-}
module Linear.Geo.ECEF (
ECEF(..)
, cross
, triple
) where
import Control.DeepSeq (NFData)
import Control.Monad.Fix (MonadFix)
import Control.Monad.Zip (MonadZip)
import Data.Coerce
import Data.Data (Data)
import Data.Distributive
import qualified Data.Vector as V
import GHC.Generics (Generic)
import qualified Linear.Affine as L
import qualified Linear.Epsilon as L
import qualified Linear.Matrix as L
import qualified Linear.Metric as L
import qualified Linear.V as L
import qualified Linear.V2 as L
import qualified Linear.V3 as L
import qualified Linear.Vector as L
newtype ECEF a = ECEF (L.V3 a)
deriving stock ( ECEF a -> ECEF a -> Bool
forall a. Eq a => ECEF a -> ECEF a -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ECEF a -> ECEF a -> Bool
$c/= :: forall a. Eq a => ECEF a -> ECEF a -> Bool
== :: ECEF a -> ECEF a -> Bool
$c== :: forall a. Eq a => ECEF a -> ECEF a -> Bool
Eq
, ECEF a -> ECEF a -> Bool
ECEF a -> ECEF a -> Ordering
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
forall {a}. Ord a => Eq (ECEF a)
forall a. Ord a => ECEF a -> ECEF a -> Bool
forall a. Ord a => ECEF a -> ECEF a -> Ordering
forall a. Ord a => ECEF a -> ECEF a -> ECEF a
min :: ECEF a -> ECEF a -> ECEF a
$cmin :: forall a. Ord a => ECEF a -> ECEF a -> ECEF a
max :: ECEF a -> ECEF a -> ECEF a
$cmax :: forall a. Ord a => ECEF a -> ECEF a -> ECEF a
>= :: ECEF a -> ECEF a -> Bool
$c>= :: forall a. Ord a => ECEF a -> ECEF a -> Bool
> :: ECEF a -> ECEF a -> Bool
$c> :: forall a. Ord a => ECEF a -> ECEF a -> Bool
<= :: ECEF a -> ECEF a -> Bool
$c<= :: forall a. Ord a => ECEF a -> ECEF a -> Bool
< :: ECEF a -> ECEF a -> Bool
$c< :: forall a. Ord a => ECEF a -> ECEF a -> Bool
compare :: ECEF a -> ECEF a -> Ordering
$ccompare :: forall a. Ord a => ECEF a -> ECEF a -> Ordering
Ord
, Int -> ECEF a -> ShowS
forall a. Show a => Int -> ECEF a -> ShowS
forall a. Show a => [ECEF a] -> ShowS
forall a. Show a => ECEF a -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ECEF a] -> ShowS
$cshowList :: forall a. Show a => [ECEF a] -> ShowS
show :: ECEF a -> String
$cshow :: forall a. Show a => ECEF a -> String
showsPrec :: Int -> ECEF a -> ShowS
$cshowsPrec :: forall a. Show a => Int -> ECEF a -> ShowS
Show
, forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
forall a x. Rep (ECEF a) x -> ECEF a
forall a x. ECEF a -> Rep (ECEF a) x
$cto :: forall a x. Rep (ECEF a) x -> ECEF a
$cfrom :: forall a x. ECEF a -> Rep (ECEF a) x
Generic
, ECEF a -> DataType
ECEF a -> Constr
forall {a}. Data a => Typeable (ECEF a)
forall a. Data a => ECEF a -> DataType
forall a. Data a => ECEF a -> Constr
forall a.
Data a =>
(forall b. Data b => b -> b) -> ECEF a -> ECEF a
forall a u.
Data a =>
Int -> (forall d. Data d => d -> u) -> ECEF a -> u
forall a u. Data a => (forall d. Data d => d -> u) -> ECEF a -> [u]
forall a r r'.
Data a =>
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ECEF a -> r
forall a r r'.
Data a =>
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ECEF a -> r
forall a (m :: * -> *).
(Data a, Monad m) =>
(forall d. Data d => d -> m d) -> ECEF a -> m (ECEF a)
forall a (m :: * -> *).
(Data a, MonadPlus m) =>
(forall d. Data d => d -> m d) -> ECEF a -> m (ECEF a)
forall a (c :: * -> *).
Data a =>
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (ECEF a)
forall a (c :: * -> *).
Data a =>
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ECEF a -> c (ECEF a)
forall a (t :: * -> *) (c :: * -> *).
(Data a, Typeable t) =>
(forall d. Data d => c (t d)) -> Maybe (c (ECEF a))
forall a (t :: * -> * -> *) (c :: * -> *).
(Data a, Typeable t) =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (ECEF a))
forall a.
Typeable a
-> (forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> a -> c a)
-> (forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c a)
-> (a -> Constr)
-> (a -> DataType)
-> (forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c a))
-> (forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c a))
-> ((forall b. Data b => b -> b) -> a -> a)
-> (forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> a -> r)
-> (forall u. (forall d. Data d => d -> u) -> a -> [u])
-> (forall u. Int -> (forall d. Data d => d -> u) -> a -> u)
-> (forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> (forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> a -> m a)
-> Data a
forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (ECEF a)
forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ECEF a -> c (ECEF a)
forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c (ECEF a))
gmapMo :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ECEF a -> m (ECEF a)
$cgmapMo :: forall a (m :: * -> *).
(Data a, MonadPlus m) =>
(forall d. Data d => d -> m d) -> ECEF a -> m (ECEF a)
gmapMp :: forall (m :: * -> *).
MonadPlus m =>
(forall d. Data d => d -> m d) -> ECEF a -> m (ECEF a)
$cgmapMp :: forall a (m :: * -> *).
(Data a, MonadPlus m) =>
(forall d. Data d => d -> m d) -> ECEF a -> m (ECEF a)
gmapM :: forall (m :: * -> *).
Monad m =>
(forall d. Data d => d -> m d) -> ECEF a -> m (ECEF a)
$cgmapM :: forall a (m :: * -> *).
(Data a, Monad m) =>
(forall d. Data d => d -> m d) -> ECEF a -> m (ECEF a)
gmapQi :: forall u. Int -> (forall d. Data d => d -> u) -> ECEF a -> u
$cgmapQi :: forall a u.
Data a =>
Int -> (forall d. Data d => d -> u) -> ECEF a -> u
gmapQ :: forall u. (forall d. Data d => d -> u) -> ECEF a -> [u]
$cgmapQ :: forall a u. Data a => (forall d. Data d => d -> u) -> ECEF a -> [u]
gmapQr :: forall r r'.
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ECEF a -> r
$cgmapQr :: forall a r r'.
Data a =>
(r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ECEF a -> r
gmapQl :: forall r r'.
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ECEF a -> r
$cgmapQl :: forall a r r'.
Data a =>
(r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ECEF a -> r
gmapT :: (forall b. Data b => b -> b) -> ECEF a -> ECEF a
$cgmapT :: forall a.
Data a =>
(forall b. Data b => b -> b) -> ECEF a -> ECEF a
dataCast2 :: forall (t :: * -> * -> *) (c :: * -> *).
Typeable t =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (ECEF a))
$cdataCast2 :: forall a (t :: * -> * -> *) (c :: * -> *).
(Data a, Typeable t) =>
(forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (ECEF a))
dataCast1 :: forall (t :: * -> *) (c :: * -> *).
Typeable t =>
(forall d. Data d => c (t d)) -> Maybe (c (ECEF a))
$cdataCast1 :: forall a (t :: * -> *) (c :: * -> *).
(Data a, Typeable t) =>
(forall d. Data d => c (t d)) -> Maybe (c (ECEF a))
dataTypeOf :: ECEF a -> DataType
$cdataTypeOf :: forall a. Data a => ECEF a -> DataType
toConstr :: ECEF a -> Constr
$ctoConstr :: forall a. Data a => ECEF a -> Constr
gunfold :: forall (c :: * -> *).
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (ECEF a)
$cgunfold :: forall a (c :: * -> *).
Data a =>
(forall b r. Data b => c (b -> r) -> c r)
-> (forall r. r -> c r) -> Constr -> c (ECEF a)
gfoldl :: forall (c :: * -> *).
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ECEF a -> c (ECEF a)
$cgfoldl :: forall a (c :: * -> *).
Data a =>
(forall d b. Data d => c (d -> b) -> d -> c b)
-> (forall g. g -> c g) -> ECEF a -> c (ECEF a)
Data
, ECEF a
forall a. a -> a -> Bounded a
forall a. Bounded a => ECEF a
maxBound :: ECEF a
$cmaxBound :: forall a. Bounded a => ECEF a
minBound :: ECEF a
$cminBound :: forall a. Bounded a => ECEF a
Bounded
)
deriving newtype ( Integer -> ECEF a
ECEF a -> ECEF a
ECEF a -> ECEF a -> ECEF a
forall a. Num a => Integer -> ECEF a
forall a. Num a => ECEF a -> ECEF a
forall a. Num a => ECEF a -> ECEF a -> ECEF a
forall a.
(a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a)
-> (a -> a)
-> (a -> a)
-> (Integer -> a)
-> Num a
fromInteger :: Integer -> ECEF a
$cfromInteger :: forall a. Num a => Integer -> ECEF a
signum :: ECEF a -> ECEF a
$csignum :: forall a. Num a => ECEF a -> ECEF a
abs :: ECEF a -> ECEF a
$cabs :: forall a. Num a => ECEF a -> ECEF a
negate :: ECEF a -> ECEF a
$cnegate :: forall a. Num a => ECEF a -> ECEF a
* :: ECEF a -> ECEF a -> ECEF a
$c* :: forall a. Num a => ECEF a -> ECEF a -> ECEF a
- :: ECEF a -> ECEF a -> ECEF a
$c- :: forall a. Num a => ECEF a -> ECEF a -> ECEF a
+ :: ECEF a -> ECEF a -> ECEF a
$c+ :: forall a. Num a => ECEF a -> ECEF a -> ECEF a
Num
, Rational -> ECEF a
ECEF a -> ECEF a
ECEF a -> ECEF a -> ECEF a
forall {a}. Fractional a => Num (ECEF a)
forall a. Fractional a => Rational -> ECEF a
forall a. Fractional a => ECEF a -> ECEF a
forall a. Fractional a => ECEF a -> ECEF a -> ECEF a
forall a.
Num a
-> (a -> a -> a) -> (a -> a) -> (Rational -> a) -> Fractional a
fromRational :: Rational -> ECEF a
$cfromRational :: forall a. Fractional a => Rational -> ECEF a
recip :: ECEF a -> ECEF a
$crecip :: forall a. Fractional a => ECEF a -> ECEF a
/ :: ECEF a -> ECEF a -> ECEF a
$c/ :: forall a. Fractional a => ECEF a -> ECEF a -> ECEF a
Fractional
, ECEF a
ECEF a -> ECEF a
ECEF a -> ECEF a -> ECEF a
forall {a}. Floating a => Fractional (ECEF a)
forall a. Floating a => ECEF a
forall a. Floating a => ECEF a -> ECEF a
forall a. Floating a => ECEF a -> ECEF a -> ECEF a
forall a.
Fractional a
-> a
-> (a -> a)
-> (a -> a)
-> (a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a)
-> (a -> a)
-> (a -> a)
-> (a -> a)
-> (a -> a)
-> (a -> a)
-> (a -> a)
-> (a -> a)
-> (a -> a)
-> (a -> a)
-> (a -> a)
-> (a -> a)
-> (a -> a)
-> (a -> a)
-> (a -> a)
-> (a -> a)
-> Floating a
log1mexp :: ECEF a -> ECEF a
$clog1mexp :: forall a. Floating a => ECEF a -> ECEF a
log1pexp :: ECEF a -> ECEF a
$clog1pexp :: forall a. Floating a => ECEF a -> ECEF a
expm1 :: ECEF a -> ECEF a
$cexpm1 :: forall a. Floating a => ECEF a -> ECEF a
log1p :: ECEF a -> ECEF a
$clog1p :: forall a. Floating a => ECEF a -> ECEF a
atanh :: ECEF a -> ECEF a
$catanh :: forall a. Floating a => ECEF a -> ECEF a
acosh :: ECEF a -> ECEF a
$cacosh :: forall a. Floating a => ECEF a -> ECEF a
asinh :: ECEF a -> ECEF a
$casinh :: forall a. Floating a => ECEF a -> ECEF a
tanh :: ECEF a -> ECEF a
$ctanh :: forall a. Floating a => ECEF a -> ECEF a
cosh :: ECEF a -> ECEF a
$ccosh :: forall a. Floating a => ECEF a -> ECEF a
sinh :: ECEF a -> ECEF a
$csinh :: forall a. Floating a => ECEF a -> ECEF a
atan :: ECEF a -> ECEF a
$catan :: forall a. Floating a => ECEF a -> ECEF a
acos :: ECEF a -> ECEF a
$cacos :: forall a. Floating a => ECEF a -> ECEF a
asin :: ECEF a -> ECEF a
$casin :: forall a. Floating a => ECEF a -> ECEF a
tan :: ECEF a -> ECEF a
$ctan :: forall a. Floating a => ECEF a -> ECEF a
cos :: ECEF a -> ECEF a
$ccos :: forall a. Floating a => ECEF a -> ECEF a
sin :: ECEF a -> ECEF a
$csin :: forall a. Floating a => ECEF a -> ECEF a
logBase :: ECEF a -> ECEF a -> ECEF a
$clogBase :: forall a. Floating a => ECEF a -> ECEF a -> ECEF a
** :: ECEF a -> ECEF a -> ECEF a
$c** :: forall a. Floating a => ECEF a -> ECEF a -> ECEF a
sqrt :: ECEF a -> ECEF a
$csqrt :: forall a. Floating a => ECEF a -> ECEF a
log :: ECEF a -> ECEF a
$clog :: forall a. Floating a => ECEF a -> ECEF a
exp :: ECEF a -> ECEF a
$cexp :: forall a. Floating a => ECEF a -> ECEF a
pi :: ECEF a
$cpi :: forall a. Floating a => ECEF a
Floating
, forall a b. a -> ECEF b -> ECEF a
forall a b. (a -> b) -> ECEF a -> ECEF b
forall (f :: * -> *).
(forall a b. (a -> b) -> f a -> f b)
-> (forall a b. a -> f b -> f a) -> Functor f
<$ :: forall a b. a -> ECEF b -> ECEF a
$c<$ :: forall a b. a -> ECEF b -> ECEF a
fmap :: forall a b. (a -> b) -> ECEF a -> ECEF b
$cfmap :: forall a b. (a -> b) -> ECEF a -> ECEF b
Functor
, Functor ECEF
forall a. a -> ECEF a
forall a b. ECEF a -> ECEF b -> ECEF a
forall a b. ECEF a -> ECEF b -> ECEF b
forall a b. ECEF (a -> b) -> ECEF a -> ECEF b
forall a b c. (a -> b -> c) -> ECEF a -> ECEF b -> ECEF c
forall (f :: * -> *).
Functor f
-> (forall a. a -> f a)
-> (forall a b. f (a -> b) -> f a -> f b)
-> (forall a b c. (a -> b -> c) -> f a -> f b -> f c)
-> (forall a b. f a -> f b -> f b)
-> (forall a b. f a -> f b -> f a)
-> Applicative f
<* :: forall a b. ECEF a -> ECEF b -> ECEF a
$c<* :: forall a b. ECEF a -> ECEF b -> ECEF a
*> :: forall a b. ECEF a -> ECEF b -> ECEF b
$c*> :: forall a b. ECEF a -> ECEF b -> ECEF b
liftA2 :: forall a b c. (a -> b -> c) -> ECEF a -> ECEF b -> ECEF c
$cliftA2 :: forall a b c. (a -> b -> c) -> ECEF a -> ECEF b -> ECEF c
<*> :: forall a b. ECEF (a -> b) -> ECEF a -> ECEF b
$c<*> :: forall a b. ECEF (a -> b) -> ECEF a -> ECEF b
pure :: forall a. a -> ECEF a
$cpure :: forall a. a -> ECEF a
Applicative
, Applicative ECEF
forall a. a -> ECEF a
forall a b. ECEF a -> ECEF b -> ECEF b
forall a b. ECEF a -> (a -> ECEF b) -> ECEF b
forall (m :: * -> *).
Applicative m
-> (forall a b. m a -> (a -> m b) -> m b)
-> (forall a b. m a -> m b -> m b)
-> (forall a. a -> m a)
-> Monad m
return :: forall a. a -> ECEF a
$creturn :: forall a. a -> ECEF a
>> :: forall a b. ECEF a -> ECEF b -> ECEF b
$c>> :: forall a b. ECEF a -> ECEF b -> ECEF b
>>= :: forall a b. ECEF a -> (a -> ECEF b) -> ECEF b
$c>>= :: forall a b. ECEF a -> (a -> ECEF b) -> ECEF b
Monad
, Monad ECEF
forall a. (a -> ECEF a) -> ECEF a
forall (m :: * -> *).
Monad m -> (forall a. (a -> m a) -> m a) -> MonadFix m
mfix :: forall a. (a -> ECEF a) -> ECEF a
$cmfix :: forall a. (a -> ECEF a) -> ECEF a
MonadFix
, Monad ECEF
forall a b. ECEF a -> ECEF b -> ECEF (a, b)
forall a b. ECEF (a, b) -> (ECEF a, ECEF b)
forall a b c. (a -> b -> c) -> ECEF a -> ECEF b -> ECEF c
forall (m :: * -> *).
Monad m
-> (forall a b. m a -> m b -> m (a, b))
-> (forall a b c. (a -> b -> c) -> m a -> m b -> m c)
-> (forall a b. m (a, b) -> (m a, m b))
-> MonadZip m
munzip :: forall a b. ECEF (a, b) -> (ECEF a, ECEF b)
$cmunzip :: forall a b. ECEF (a, b) -> (ECEF a, ECEF b)
mzipWith :: forall a b c. (a -> b -> c) -> ECEF a -> ECEF b -> ECEF c
$cmzipWith :: forall a b c. (a -> b -> c) -> ECEF a -> ECEF b -> ECEF c
mzip :: forall a b. ECEF a -> ECEF b -> ECEF (a, b)
$cmzip :: forall a b. ECEF a -> ECEF b -> ECEF (a, b)
MonadZip
, forall a. Eq a => a -> ECEF a -> Bool
forall a. Num a => ECEF a -> a
forall a. Ord a => ECEF a -> a
forall m. Monoid m => ECEF m -> m
forall a. ECEF a -> Bool
forall a. ECEF a -> Int
forall a. ECEF a -> [a]
forall a. (a -> a -> a) -> ECEF a -> a
forall m a. Monoid m => (a -> m) -> ECEF a -> m
forall b a. (b -> a -> b) -> b -> ECEF a -> b
forall a b. (a -> b -> b) -> b -> ECEF a -> b
forall (t :: * -> *).
(forall m. Monoid m => t m -> m)
-> (forall m a. Monoid m => (a -> m) -> t a -> m)
-> (forall m a. Monoid m => (a -> m) -> t a -> m)
-> (forall a b. (a -> b -> b) -> b -> t a -> b)
-> (forall a b. (a -> b -> b) -> b -> t a -> b)
-> (forall b a. (b -> a -> b) -> b -> t a -> b)
-> (forall b a. (b -> a -> b) -> b -> t a -> b)
-> (forall a. (a -> a -> a) -> t a -> a)
-> (forall a. (a -> a -> a) -> t a -> a)
-> (forall a. t a -> [a])
-> (forall a. t a -> Bool)
-> (forall a. t a -> Int)
-> (forall a. Eq a => a -> t a -> Bool)
-> (forall a. Ord a => t a -> a)
-> (forall a. Ord a => t a -> a)
-> (forall a. Num a => t a -> a)
-> (forall a. Num a => t a -> a)
-> Foldable t
product :: forall a. Num a => ECEF a -> a
$cproduct :: forall a. Num a => ECEF a -> a
sum :: forall a. Num a => ECEF a -> a
$csum :: forall a. Num a => ECEF a -> a
minimum :: forall a. Ord a => ECEF a -> a
$cminimum :: forall a. Ord a => ECEF a -> a
maximum :: forall a. Ord a => ECEF a -> a
$cmaximum :: forall a. Ord a => ECEF a -> a
elem :: forall a. Eq a => a -> ECEF a -> Bool
$celem :: forall a. Eq a => a -> ECEF a -> Bool
length :: forall a. ECEF a -> Int
$clength :: forall a. ECEF a -> Int
null :: forall a. ECEF a -> Bool
$cnull :: forall a. ECEF a -> Bool
toList :: forall a. ECEF a -> [a]
$ctoList :: forall a. ECEF a -> [a]
foldl1 :: forall a. (a -> a -> a) -> ECEF a -> a
$cfoldl1 :: forall a. (a -> a -> a) -> ECEF a -> a
foldr1 :: forall a. (a -> a -> a) -> ECEF a -> a
$cfoldr1 :: forall a. (a -> a -> a) -> ECEF a -> a
foldl' :: forall b a. (b -> a -> b) -> b -> ECEF a -> b
$cfoldl' :: forall b a. (b -> a -> b) -> b -> ECEF a -> b
foldl :: forall b a. (b -> a -> b) -> b -> ECEF a -> b
$cfoldl :: forall b a. (b -> a -> b) -> b -> ECEF a -> b
foldr' :: forall a b. (a -> b -> b) -> b -> ECEF a -> b
$cfoldr' :: forall a b. (a -> b -> b) -> b -> ECEF a -> b
foldr :: forall a b. (a -> b -> b) -> b -> ECEF a -> b
$cfoldr :: forall a b. (a -> b -> b) -> b -> ECEF a -> b
foldMap' :: forall m a. Monoid m => (a -> m) -> ECEF a -> m
$cfoldMap' :: forall m a. Monoid m => (a -> m) -> ECEF a -> m
foldMap :: forall m a. Monoid m => (a -> m) -> ECEF a -> m
$cfoldMap :: forall m a. Monoid m => (a -> m) -> ECEF a -> m
fold :: forall m. Monoid m => ECEF m -> m
$cfold :: forall m. Monoid m => ECEF m -> m
Foldable
, Functor ECEF
forall a. Num a => ECEF a
forall a. Num a => a -> ECEF a -> ECEF a -> ECEF a
forall a. Num a => ECEF a -> ECEF a -> ECEF a
forall a. (a -> a -> a) -> ECEF a -> ECEF a -> ECEF a
forall a b c. (a -> b -> c) -> ECEF a -> ECEF b -> ECEF c
forall (f :: * -> *).
Functor f
-> (forall a. Num a => f a)
-> (forall a. Num a => f a -> f a -> f a)
-> (forall a. Num a => f a -> f a -> f a)
-> (forall a. Num a => a -> f a -> f a -> f a)
-> (forall a. (a -> a -> a) -> f a -> f a -> f a)
-> (forall a b c. (a -> b -> c) -> f a -> f b -> f c)
-> Additive f
liftI2 :: forall a b c. (a -> b -> c) -> ECEF a -> ECEF b -> ECEF c
$cliftI2 :: forall a b c. (a -> b -> c) -> ECEF a -> ECEF b -> ECEF c
liftU2 :: forall a. (a -> a -> a) -> ECEF a -> ECEF a -> ECEF a
$cliftU2 :: forall a. (a -> a -> a) -> ECEF a -> ECEF a -> ECEF a
lerp :: forall a. Num a => a -> ECEF a -> ECEF a -> ECEF a
$clerp :: forall a. Num a => a -> ECEF a -> ECEF a -> ECEF a
^-^ :: forall a. Num a => ECEF a -> ECEF a -> ECEF a
$c^-^ :: forall a. Num a => ECEF a -> ECEF a -> ECEF a
^+^ :: forall a. Num a => ECEF a -> ECEF a -> ECEF a
$c^+^ :: forall a. Num a => ECEF a -> ECEF a -> ECEF a
zero :: forall a. Num a => ECEF a
$czero :: forall a. Num a => ECEF a
L.Additive
, Additive ECEF
forall a. Floating a => ECEF a -> a
forall a. Floating a => ECEF a -> ECEF a
forall a. Floating a => ECEF a -> ECEF a -> a
forall a. Num a => ECEF a -> a
forall a. Num a => ECEF a -> ECEF a -> a
forall (f :: * -> *).
Additive f
-> (forall a. Num a => f a -> f a -> a)
-> (forall a. Num a => f a -> a)
-> (forall a. Num a => f a -> f a -> a)
-> (forall a. Floating a => f a -> f a -> a)
-> (forall a. Floating a => f a -> a)
-> (forall a. Floating a => f a -> f a)
-> Metric f
signorm :: forall a. Floating a => ECEF a -> ECEF a
$csignorm :: forall a. Floating a => ECEF a -> ECEF a
norm :: forall a. Floating a => ECEF a -> a
$cnorm :: forall a. Floating a => ECEF a -> a
distance :: forall a. Floating a => ECEF a -> ECEF a -> a
$cdistance :: forall a. Floating a => ECEF a -> ECEF a -> a
qd :: forall a. Num a => ECEF a -> ECEF a -> a
$cqd :: forall a. Num a => ECEF a -> ECEF a -> a
quadrance :: forall a. Num a => ECEF a -> a
$cquadrance :: forall a. Num a => ECEF a -> a
dot :: forall a. Num a => ECEF a -> ECEF a -> a
$cdot :: forall a. Num a => ECEF a -> ECEF a -> a
L.Metric
, Functor ECEF
forall a. Num a => ECEF (ECEF a) -> a
forall a. ECEF (ECEF a) -> ECEF a
forall (m :: * -> *).
Functor m
-> (forall a. Num a => m (m a) -> a)
-> (forall a. m (m a) -> m a)
-> Trace m
diagonal :: forall a. ECEF (ECEF a) -> ECEF a
$cdiagonal :: forall a. ECEF (ECEF a) -> ECEF a
trace :: forall a. Num a => ECEF (ECEF a) -> a
$ctrace :: forall a. Num a => ECEF (ECEF a) -> a
L.Trace
, ECEF a -> Bool
forall a. Num a -> (a -> Bool) -> Epsilon a
forall {a}. Epsilon a => Num (ECEF a)
forall a. Epsilon a => ECEF a -> Bool
nearZero :: ECEF a -> Bool
$cnearZero :: forall a. Epsilon a => ECEF a -> Bool
L.Epsilon
, ECEF a -> ()
forall a. NFData a => ECEF a -> ()
forall a. (a -> ()) -> NFData a
rnf :: ECEF a -> ()
$crnf :: forall a. NFData a => ECEF a -> ()
NFData
)
instance Traversable ECEF where
traverse :: forall (f :: * -> *) a b.
Applicative f =>
(a -> f b) -> ECEF a -> f (ECEF b)
traverse a -> f b
f ECEF a
ecef = forall (t :: * -> *) (f :: * -> *) a b.
(Traversable t, Applicative f) =>
(a -> f b) -> t a -> f (t b)
traverse a -> f b
f (coerce :: forall a b. Coercible a b => a -> b
coerce ECEF a
ecef)
instance Distributive ECEF where
distribute :: forall (f :: * -> *) a. Functor f => f (ECEF a) -> ECEF (f a)
distribute f (ECEF a)
f = forall a. V3 a -> ECEF a
ECEF forall a b. (a -> b) -> a -> b
$ forall a. a -> a -> a -> V3 a
L.V3 (forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap (\(ECEF (L.V3 a
x a
_ a
_)) -> a
x) f (ECEF a)
f)
(forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap (\(ECEF (L.V3 a
_ a
y a
_)) -> a
y) f (ECEF a)
f)
(forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
fmap (\(ECEF (L.V3 a
_ a
_ a
z)) -> a
z) f (ECEF a)
f)
instance L.Finite ECEF where
type Size ECEF = 3
toV :: forall a. ECEF a -> V (Size ECEF) a
toV (ECEF (L.V3 a
x a
y a
z)) = forall {k} (n :: k) a. Vector a -> V n a
L.V (forall a. Int -> [a] -> Vector a
V.fromListN Int
3 [a
x, a
y, a
z])
fromV :: forall a. V (Size ECEF) a -> ECEF a
fromV (L.V Vector a
v) = forall a. V3 a -> ECEF a
ECEF forall a b. (a -> b) -> a -> b
$ forall a. a -> a -> a -> V3 a
L.V3 (Vector a
v forall a. Vector a -> Int -> a
V.! Int
0) (Vector a
v forall a. Vector a -> Int -> a
V.! Int
1) (Vector a
v forall a. Vector a -> Int -> a
V.! Int
2)
instance L.R1 ECEF where
_x :: forall a. Lens' (ECEF a) a
_x a -> f a
f (ECEF (L.V3 a
x a
y a
z)) = (\a
x' -> forall a. V3 a -> ECEF a
ECEF (forall a. a -> a -> a -> V3 a
L.V3 a
x' a
y a
z)) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> a -> f a
f a
x
instance L.R2 ECEF where
_y :: forall a. Lens' (ECEF a) a
_y a -> f a
f (ECEF (L.V3 a
x a
y a
z)) = (\a
y' -> forall a. V3 a -> ECEF a
ECEF (forall a. a -> a -> a -> V3 a
L.V3 a
x a
y' a
z)) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> a -> f a
f a
y
_xy :: forall a. Lens' (ECEF a) (V2 a)
_xy V2 a -> f (V2 a)
f (ECEF (L.V3 a
x a
y a
z)) = (\(L.V2 a
x' a
y') -> forall a. V3 a -> ECEF a
ECEF (forall a. a -> a -> a -> V3 a
L.V3 a
x' a
y' a
z))
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> V2 a -> f (V2 a)
f (forall a. a -> a -> V2 a
L.V2 a
x a
y)
instance L.R3 ECEF where
_z :: forall a. Lens' (ECEF a) a
_z a -> f a
f (ECEF (L.V3 a
x a
y a
z)) = (\a
z' -> forall a. V3 a -> ECEF a
ECEF (forall a. a -> a -> a -> V3 a
L.V3 a
x a
y a
z')) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> a -> f a
f a
z
_xyz :: forall a. Lens' (ECEF a) (V3 a)
_xyz V3 a -> f (V3 a)
f (ECEF V3 a
v) = forall a. V3 a -> ECEF a
ECEF forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> V3 a -> f (V3 a)
f V3 a
v
instance L.Affine ECEF where
type Diff ECEF = L.V3
(ECEF V3 a
x) .-. :: forall a. Num a => ECEF a -> ECEF a -> Diff ECEF a
.-. (ECEF V3 a
y) = V3 a
x forall (p :: * -> *) a. (Affine p, Num a) => p a -> p a -> Diff p a
L..-. V3 a
y
(ECEF V3 a
x) .+^ :: forall a. Num a => ECEF a -> Diff ECEF a -> ECEF a
.+^ Diff ECEF a
y = forall a. V3 a -> ECEF a
ECEF (V3 a
x forall (p :: * -> *) a. (Affine p, Num a) => p a -> Diff p a -> p a
L..+^ Diff ECEF a
y)
(ECEF V3 a
x) .-^ :: forall a. Num a => ECEF a -> Diff ECEF a -> ECEF a
.-^ Diff ECEF a
y = forall a. V3 a -> ECEF a
ECEF (V3 a
x forall (p :: * -> *) a. (Affine p, Num a) => p a -> Diff p a -> p a
L..-^ Diff ECEF a
y)
cross :: Num a => ECEF a -> ECEF a -> ECEF a
cross :: forall a. Num a => ECEF a -> ECEF a -> ECEF a
cross ECEF a
x ECEF a
y = forall a. V3 a -> ECEF a
ECEF forall a b. (a -> b) -> a -> b
$ forall a. Num a => V3 a -> V3 a -> V3 a
L.cross (coerce :: forall a b. Coercible a b => a -> b
coerce ECEF a
x) (coerce :: forall a b. Coercible a b => a -> b
coerce ECEF a
y)
triple :: Num a => ECEF a -> ECEF a -> ECEF a -> a
triple :: forall a. Num a => ECEF a -> ECEF a -> ECEF a -> a
triple ECEF a
x ECEF a
y ECEF a
z = forall a. Num a => V3 a -> V3 a -> V3 a -> a
L.triple (coerce :: forall a b. Coercible a b => a -> b
coerce ECEF a
x) (coerce :: forall a b. Coercible a b => a -> b
coerce ECEF a
y) (coerce :: forall a b. Coercible a b => a -> b
coerce ECEF a
z)