packages feed

geomancy-0.4.0.0: src/Geomancy/Swizzle/DVec/Up.hs

{-# LANGUAGE BlockArguments #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# OPTIONS_GHC -Wno-orphans #-}

module Geomancy.Swizzle.DVec.Up () where

import GHC.Records (HasField(..))

import Geomancy.DVec2 (DVec2, withDVec2)
import Geomancy.DVec3 (DVec3, dvec3, withDVec3)
import Geomancy.DVec4 (DVec4, dvec4)

instance HasField "xxx" DVec2 DVec3 where
  {-# INLINE getField #-}
  getField v = withDVec2 v \x _ -> dvec3 x x x

instance HasField "xxy" DVec2 DVec3 where
  {-# INLINE getField #-}
  getField v = withDVec2 v \x y -> dvec3 x x y

instance HasField "xyx" DVec2 DVec3 where
  {-# INLINE getField #-}
  getField v = withDVec2 v \x y -> dvec3 x y x

instance HasField "xyy" DVec2 DVec3 where
  {-# INLINE getField #-}
  getField v = withDVec2 v \x y -> dvec3 x y y

instance HasField "yxx" DVec2 DVec3 where
  {-# INLINE getField #-}
  getField v = withDVec2 v \x y -> dvec3 y x x

instance HasField "yxy" DVec2 DVec3 where
  {-# INLINE getField #-}
  getField v = withDVec2 v \x y -> dvec3 y x y

instance HasField "yyx" DVec2 DVec3 where
  {-# INLINE getField #-}
  getField v = withDVec2 v \x y -> dvec3 y y x

instance HasField "yyy" DVec2 DVec3 where
  {-# INLINE getField #-}
  getField v = withDVec2 v \_ y -> dvec3 y y y

instance HasField "xxxx" DVec2 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec2 v \x _ -> dvec4 x x x x

instance HasField "xxxy" DVec2 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec2 v \x y -> dvec4 x x x y

instance HasField "xxyx" DVec2 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec2 v \x y -> dvec4 x x y x

instance HasField "xxyy" DVec2 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec2 v \x y -> dvec4 x x y y

instance HasField "xyxx" DVec2 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec2 v \x y -> dvec4 x y x x

instance HasField "xyxy" DVec2 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec2 v \x y -> dvec4 x y x y

instance HasField "xyyx" DVec2 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec2 v \x y -> dvec4 x y y x

instance HasField "xyyy" DVec2 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec2 v \x y -> dvec4 x y y y

instance HasField "yxxx" DVec2 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec2 v \x y -> dvec4 y x x x

instance HasField "yxxy" DVec2 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec2 v \x y -> dvec4 y x x y

instance HasField "yxyx" DVec2 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec2 v \x y -> dvec4 y x y x

instance HasField "yxyy" DVec2 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec2 v \x y -> dvec4 y x y y

instance HasField "yyxx" DVec2 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec2 v \x y -> dvec4 y y x x

instance HasField "yyxy" DVec2 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec2 v \x y -> dvec4 y y x y

instance HasField "yyyx" DVec2 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec2 v \x y -> dvec4 y y y x

instance HasField "yyyy" DVec2 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec2 v \_ y -> dvec4 y y y y

instance HasField "xxxx" DVec3 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec3 v \x _ _ -> dvec4 x x x x

instance HasField "xxxy" DVec3 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec3 v \x y _ -> dvec4 x x x y

instance HasField "xxxz" DVec3 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec3 v \x _ z -> dvec4 x x x z

instance HasField "xxyx" DVec3 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec3 v \x y _ -> dvec4 x x y x

instance HasField "xxyy" DVec3 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec3 v \x y _ -> dvec4 x x y y

instance HasField "xxyz" DVec3 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec3 v \x y z -> dvec4 x x y z

instance HasField "xxzx" DVec3 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec3 v \x _ z -> dvec4 x x z x

instance HasField "xxzy" DVec3 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec3 v \x y z -> dvec4 x x z y

instance HasField "xxzz" DVec3 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec3 v \x _ z -> dvec4 x x z z

instance HasField "xyxx" DVec3 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec3 v \x y _ -> dvec4 x y x x

instance HasField "xyxy" DVec3 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec3 v \x y _ -> dvec4 x y x y

instance HasField "xyxz" DVec3 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec3 v \x y z -> dvec4 x y x z

instance HasField "xyyx" DVec3 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec3 v \x y _ -> dvec4 x y y x

instance HasField "xyyy" DVec3 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec3 v \x y _ -> dvec4 x y y y

instance HasField "xyyz" DVec3 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec3 v \x y z -> dvec4 x y y z

instance HasField "xyzx" DVec3 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec3 v \x y z -> dvec4 x y z x

instance HasField "xyzy" DVec3 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec3 v \x y z -> dvec4 x y z y

instance HasField "xyzz" DVec3 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec3 v \x y z -> dvec4 x y z z

instance HasField "xzxx" DVec3 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec3 v \x _ z -> dvec4 x z x x

instance HasField "xzxy" DVec3 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec3 v \x y z -> dvec4 x z x y

instance HasField "xzxz" DVec3 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec3 v \x _ z -> dvec4 x z x z

instance HasField "xzyx" DVec3 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec3 v \x y z -> dvec4 x z y x

instance HasField "xzyy" DVec3 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec3 v \x y z -> dvec4 x z y y

instance HasField "xzyz" DVec3 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec3 v \x y z -> dvec4 x z y z

instance HasField "xzzx" DVec3 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec3 v \x _ z -> dvec4 x z z x

instance HasField "xzzy" DVec3 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec3 v \x y z -> dvec4 x z z y

instance HasField "xzzz" DVec3 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec3 v \x _ z -> dvec4 x z z z

instance HasField "yxxx" DVec3 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec3 v \x y _ -> dvec4 y x x x

instance HasField "yxxy" DVec3 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec3 v \x y _ -> dvec4 y x x y

instance HasField "yxxz" DVec3 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec3 v \x y z -> dvec4 y x x z

instance HasField "yxyx" DVec3 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec3 v \x y _ -> dvec4 y x y x

instance HasField "yxyy" DVec3 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec3 v \x y _ -> dvec4 y x y y

instance HasField "yxyz" DVec3 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec3 v \x y z -> dvec4 y x y z

instance HasField "yxzx" DVec3 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec3 v \x y z -> dvec4 y x z x

instance HasField "yxzy" DVec3 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec3 v \x y z -> dvec4 y x z y

instance HasField "yxzz" DVec3 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec3 v \x y z -> dvec4 y x z z

instance HasField "yyxx" DVec3 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec3 v \x y _ -> dvec4 y y x x

instance HasField "yyxy" DVec3 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec3 v \x y _ -> dvec4 y y x y

instance HasField "yyxz" DVec3 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec3 v \x y z -> dvec4 y y x z

instance HasField "yyyx" DVec3 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec3 v \x y _ -> dvec4 y y y x

instance HasField "yyyy" DVec3 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec3 v \_ y _ -> dvec4 y y y y

instance HasField "yyyz" DVec3 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec3 v \_ y z -> dvec4 y y y z

instance HasField "yyzx" DVec3 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec3 v \x y z -> dvec4 y y z x

instance HasField "yyzy" DVec3 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec3 v \_ y z -> dvec4 y y z y

instance HasField "yyzz" DVec3 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec3 v \_ y z -> dvec4 y y z z

instance HasField "yzxx" DVec3 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec3 v \x y z -> dvec4 y z x x

instance HasField "yzxy" DVec3 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec3 v \x y z -> dvec4 y z x y

instance HasField "yzxz" DVec3 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec3 v \x y z -> dvec4 y z x z

instance HasField "yzyx" DVec3 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec3 v \x y z -> dvec4 y z y x

instance HasField "yzyy" DVec3 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec3 v \_ y z -> dvec4 y z y y

instance HasField "yzyz" DVec3 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec3 v \_ y z -> dvec4 y z y z

instance HasField "yzzx" DVec3 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec3 v \x y z -> dvec4 y z z x

instance HasField "yzzy" DVec3 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec3 v \_ y z -> dvec4 y z z y

instance HasField "yzzz" DVec3 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec3 v \_ y z -> dvec4 y z z z

instance HasField "zxxx" DVec3 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec3 v \x _ z -> dvec4 z x x x

instance HasField "zxxy" DVec3 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec3 v \x y z -> dvec4 z x x y

instance HasField "zxxz" DVec3 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec3 v \x _ z -> dvec4 z x x z

instance HasField "zxyx" DVec3 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec3 v \x y z -> dvec4 z x y x

instance HasField "zxyy" DVec3 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec3 v \x y z -> dvec4 z x y y

instance HasField "zxyz" DVec3 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec3 v \x y z -> dvec4 z x y z

instance HasField "zxzx" DVec3 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec3 v \x _ z -> dvec4 z x z x

instance HasField "zxzy" DVec3 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec3 v \x y z -> dvec4 z x z y

instance HasField "zxzz" DVec3 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec3 v \x _ z -> dvec4 z x z z

instance HasField "zyxx" DVec3 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec3 v \x y z -> dvec4 z y x x

instance HasField "zyxy" DVec3 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec3 v \x y z -> dvec4 z y x y

instance HasField "zyxz" DVec3 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec3 v \x y z -> dvec4 z y x z

instance HasField "zyyx" DVec3 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec3 v \x y z -> dvec4 z y y x

instance HasField "zyyy" DVec3 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec3 v \_ y z -> dvec4 z y y y

instance HasField "zyyz" DVec3 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec3 v \_ y z -> dvec4 z y y z

instance HasField "zyzx" DVec3 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec3 v \x y z -> dvec4 z y z x

instance HasField "zyzy" DVec3 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec3 v \_ y z -> dvec4 z y z y

instance HasField "zyzz" DVec3 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec3 v \_ y z -> dvec4 z y z z

instance HasField "zzxx" DVec3 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec3 v \x _ z -> dvec4 z z x x

instance HasField "zzxy" DVec3 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec3 v \x y z -> dvec4 z z x y

instance HasField "zzxz" DVec3 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec3 v \x _ z -> dvec4 z z x z

instance HasField "zzyx" DVec3 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec3 v \x y z -> dvec4 z z y x

instance HasField "zzyy" DVec3 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec3 v \_ y z -> dvec4 z z y y

instance HasField "zzyz" DVec3 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec3 v \_ y z -> dvec4 z z y z

instance HasField "zzzx" DVec3 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec3 v \x _ z -> dvec4 z z z x

instance HasField "zzzy" DVec3 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec3 v \_ y z -> dvec4 z z z y

instance HasField "zzzz" DVec3 DVec4 where
  {-# INLINE getField #-}
  getField v = withDVec3 v \_ _ z -> dvec4 z z z z