packages feed

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

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

module Geomancy.Swizzle.DVec.Down () where

import GHC.Records (HasField(..))

import Geomancy.DVec2 (DVec2, dvec2)
import Geomancy.DVec3 (DVec3, dvec3, withDVec3)
import Geomancy.DVec4 (DVec4, withDVec4)

instance HasField "xx" DVec3 DVec2 where
  {-# INLINE getField #-}
  getField v = withDVec3 v \x _ _ -> dvec2 x x

instance HasField "xy" DVec3 DVec2 where
  {-# INLINE getField #-}
  getField v = withDVec3 v \x y _ -> dvec2 x y

instance HasField "xz" DVec3 DVec2 where
  {-# INLINE getField #-}
  getField v = withDVec3 v \x _ z -> dvec2 x z

instance HasField "yx" DVec3 DVec2 where
  {-# INLINE getField #-}
  getField v = withDVec3 v \x y _ -> dvec2 y x

instance HasField "yy" DVec3 DVec2 where
  {-# INLINE getField #-}
  getField v = withDVec3 v \_ y _ -> dvec2 y y

instance HasField "yz" DVec3 DVec2 where
  {-# INLINE getField #-}
  getField v = withDVec3 v \_ y z -> dvec2 y z

instance HasField "zx" DVec3 DVec2 where
  {-# INLINE getField #-}
  getField v = withDVec3 v \x _ z -> dvec2 z x

instance HasField "zy" DVec3 DVec2 where
  {-# INLINE getField #-}
  getField v = withDVec3 v \_ y z -> dvec2 z y

instance HasField "zz" DVec3 DVec2 where
  {-# INLINE getField #-}
  getField v = withDVec3 v \_ _ z -> dvec2 z z

instance HasField "xx" DVec4 DVec2 where
  {-# INLINE getField #-}
  getField v = withDVec4 v \x _ _ _ -> dvec2 x x

instance HasField "xy" DVec4 DVec2 where
  {-# INLINE getField #-}
  getField v = withDVec4 v \x y _ _ -> dvec2 x y

instance HasField "xz" DVec4 DVec2 where
  {-# INLINE getField #-}
  getField v = withDVec4 v \x _ z _ -> dvec2 x z

instance HasField "xw" DVec4 DVec2 where
  {-# INLINE getField #-}
  getField v = withDVec4 v \x _ _ w -> dvec2 x w

instance HasField "yx" DVec4 DVec2 where
  {-# INLINE getField #-}
  getField v = withDVec4 v \x y _ _ -> dvec2 y x

instance HasField "yy" DVec4 DVec2 where
  {-# INLINE getField #-}
  getField v = withDVec4 v \_ y _ _ -> dvec2 y y

instance HasField "yz" DVec4 DVec2 where
  {-# INLINE getField #-}
  getField v = withDVec4 v \_ y z _ -> dvec2 y z

instance HasField "yw" DVec4 DVec2 where
  {-# INLINE getField #-}
  getField v = withDVec4 v \_ y _ w -> dvec2 y w

instance HasField "zx" DVec4 DVec2 where
  {-# INLINE getField #-}
  getField v = withDVec4 v \x _ z _ -> dvec2 z x

instance HasField "zy" DVec4 DVec2 where
  {-# INLINE getField #-}
  getField v = withDVec4 v \_ y z _ -> dvec2 z y

instance HasField "zz" DVec4 DVec2 where
  {-# INLINE getField #-}
  getField v = withDVec4 v \_ _ z _ -> dvec2 z z

instance HasField "zw" DVec4 DVec2 where
  {-# INLINE getField #-}
  getField v = withDVec4 v \_ _ z w -> dvec2 z w

instance HasField "wx" DVec4 DVec2 where
  {-# INLINE getField #-}
  getField v = withDVec4 v \x _ _ w -> dvec2 w x

instance HasField "wy" DVec4 DVec2 where
  {-# INLINE getField #-}
  getField v = withDVec4 v \_ y _ w -> dvec2 w y

instance HasField "wz" DVec4 DVec2 where
  {-# INLINE getField #-}
  getField v = withDVec4 v \_ _ z w -> dvec2 w z

instance HasField "ww" DVec4 DVec2 where
  {-# INLINE getField #-}
  getField v = withDVec4 v \_ _ _ w -> dvec2 w w

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

instance HasField "xxy" DVec4 DVec3 where
  {-# INLINE getField #-}
  getField v = withDVec4 v \x y _ _ -> dvec3 x x y

instance HasField "xxz" DVec4 DVec3 where
  {-# INLINE getField #-}
  getField v = withDVec4 v \x _ z _ -> dvec3 x x z

instance HasField "xxw" DVec4 DVec3 where
  {-# INLINE getField #-}
  getField v = withDVec4 v \x _ _ w -> dvec3 x x w

instance HasField "xyx" DVec4 DVec3 where
  {-# INLINE getField #-}
  getField v = withDVec4 v \x y _ _ -> dvec3 x y x

instance HasField "xyy" DVec4 DVec3 where
  {-# INLINE getField #-}
  getField v = withDVec4 v \x y _ _ -> dvec3 x y y

instance HasField "xyz" DVec4 DVec3 where
  {-# INLINE getField #-}
  getField v = withDVec4 v \x y z _ -> dvec3 x y z

instance HasField "xyw" DVec4 DVec3 where
  {-# INLINE getField #-}
  getField v = withDVec4 v \x y _ w -> dvec3 x y w

instance HasField "xzx" DVec4 DVec3 where
  {-# INLINE getField #-}
  getField v = withDVec4 v \x _ z _ -> dvec3 x z x

instance HasField "xzy" DVec4 DVec3 where
  {-# INLINE getField #-}
  getField v = withDVec4 v \x y z _ -> dvec3 x z y

instance HasField "xzz" DVec4 DVec3 where
  {-# INLINE getField #-}
  getField v = withDVec4 v \x _ z _ -> dvec3 x z z

instance HasField "xzw" DVec4 DVec3 where
  {-# INLINE getField #-}
  getField v = withDVec4 v \x _ z w -> dvec3 x z w

instance HasField "xwx" DVec4 DVec3 where
  {-# INLINE getField #-}
  getField v = withDVec4 v \x _ _ w -> dvec3 x w x

instance HasField "xwy" DVec4 DVec3 where
  {-# INLINE getField #-}
  getField v = withDVec4 v \x y _ w -> dvec3 x w y

instance HasField "xwz" DVec4 DVec3 where
  {-# INLINE getField #-}
  getField v = withDVec4 v \x _ z w -> dvec3 x w z

instance HasField "xww" DVec4 DVec3 where
  {-# INLINE getField #-}
  getField v = withDVec4 v \x _ _ w -> dvec3 x w w

instance HasField "yxx" DVec4 DVec3 where
  {-# INLINE getField #-}
  getField v = withDVec4 v \x y _ _ -> dvec3 y x x

instance HasField "yxy" DVec4 DVec3 where
  {-# INLINE getField #-}
  getField v = withDVec4 v \x y _ _ -> dvec3 y x y

instance HasField "yxz" DVec4 DVec3 where
  {-# INLINE getField #-}
  getField v = withDVec4 v \x y z _ -> dvec3 y x z

instance HasField "yxw" DVec4 DVec3 where
  {-# INLINE getField #-}
  getField v = withDVec4 v \x y _ w -> dvec3 y x w

instance HasField "yyx" DVec4 DVec3 where
  {-# INLINE getField #-}
  getField v = withDVec4 v \x y _ _ -> dvec3 y y x

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

instance HasField "yyz" DVec4 DVec3 where
  {-# INLINE getField #-}
  getField v = withDVec4 v \_ y z _ -> dvec3 y y z

instance HasField "yyw" DVec4 DVec3 where
  {-# INLINE getField #-}
  getField v = withDVec4 v \_ y _ w -> dvec3 y y w

instance HasField "yzx" DVec4 DVec3 where
  {-# INLINE getField #-}
  getField v = withDVec4 v \x y z _ -> dvec3 y z x

instance HasField "yzy" DVec4 DVec3 where
  {-# INLINE getField #-}
  getField v = withDVec4 v \_ y z _ -> dvec3 y z y

instance HasField "yzz" DVec4 DVec3 where
  {-# INLINE getField #-}
  getField v = withDVec4 v \_ y z _ -> dvec3 y z z

instance HasField "yzw" DVec4 DVec3 where
  {-# INLINE getField #-}
  getField v = withDVec4 v \_ y z w -> dvec3 y z w

instance HasField "ywx" DVec4 DVec3 where
  {-# INLINE getField #-}
  getField v = withDVec4 v \x y _ w -> dvec3 y w x

instance HasField "ywy" DVec4 DVec3 where
  {-# INLINE getField #-}
  getField v = withDVec4 v \_ y _ w -> dvec3 y w y

instance HasField "ywz" DVec4 DVec3 where
  {-# INLINE getField #-}
  getField v = withDVec4 v \_ y z w -> dvec3 y w z

instance HasField "yww" DVec4 DVec3 where
  {-# INLINE getField #-}
  getField v = withDVec4 v \_ y _ w -> dvec3 y w w

instance HasField "zxx" DVec4 DVec3 where
  {-# INLINE getField #-}
  getField v = withDVec4 v \x _ z _ -> dvec3 z x x

instance HasField "zxy" DVec4 DVec3 where
  {-# INLINE getField #-}
  getField v = withDVec4 v \x y z _ -> dvec3 z x y

instance HasField "zxz" DVec4 DVec3 where
  {-# INLINE getField #-}
  getField v = withDVec4 v \x _ z _ -> dvec3 z x z

instance HasField "zxw" DVec4 DVec3 where
  {-# INLINE getField #-}
  getField v = withDVec4 v \x _ z w -> dvec3 z x w

instance HasField "zyx" DVec4 DVec3 where
  {-# INLINE getField #-}
  getField v = withDVec4 v \x y z _ -> dvec3 z y x

instance HasField "zyy" DVec4 DVec3 where
  {-# INLINE getField #-}
  getField v = withDVec4 v \_ y z _ -> dvec3 z y y

instance HasField "zyz" DVec4 DVec3 where
  {-# INLINE getField #-}
  getField v = withDVec4 v \_ y z _ -> dvec3 z y z

instance HasField "zyw" DVec4 DVec3 where
  {-# INLINE getField #-}
  getField v = withDVec4 v \_ y z w -> dvec3 z y w

instance HasField "zzx" DVec4 DVec3 where
  {-# INLINE getField #-}
  getField v = withDVec4 v \x _ z _ -> dvec3 z z x

instance HasField "zzy" DVec4 DVec3 where
  {-# INLINE getField #-}
  getField v = withDVec4 v \_ y z _ -> dvec3 z z y

instance HasField "zzz" DVec4 DVec3 where
  {-# INLINE getField #-}
  getField v = withDVec4 v \_ _ z _ -> dvec3 z z z

instance HasField "zzw" DVec4 DVec3 where
  {-# INLINE getField #-}
  getField v = withDVec4 v \_ _ z w -> dvec3 z z w

instance HasField "zwx" DVec4 DVec3 where
  {-# INLINE getField #-}
  getField v = withDVec4 v \x _ z w -> dvec3 z w x

instance HasField "zwy" DVec4 DVec3 where
  {-# INLINE getField #-}
  getField v = withDVec4 v \_ y z w -> dvec3 z w y

instance HasField "zwz" DVec4 DVec3 where
  {-# INLINE getField #-}
  getField v = withDVec4 v \_ _ z w -> dvec3 z w z

instance HasField "zww" DVec4 DVec3 where
  {-# INLINE getField #-}
  getField v = withDVec4 v \_ _ z w -> dvec3 z w w

instance HasField "wxx" DVec4 DVec3 where
  {-# INLINE getField #-}
  getField v = withDVec4 v \x _ _ w -> dvec3 w x x

instance HasField "wxy" DVec4 DVec3 where
  {-# INLINE getField #-}
  getField v = withDVec4 v \x y _ w -> dvec3 w x y

instance HasField "wxz" DVec4 DVec3 where
  {-# INLINE getField #-}
  getField v = withDVec4 v \x _ z w -> dvec3 w x z

instance HasField "wxw" DVec4 DVec3 where
  {-# INLINE getField #-}
  getField v = withDVec4 v \x _ _ w -> dvec3 w x w

instance HasField "wyx" DVec4 DVec3 where
  {-# INLINE getField #-}
  getField v = withDVec4 v \x y _ w -> dvec3 w y x

instance HasField "wyy" DVec4 DVec3 where
  {-# INLINE getField #-}
  getField v = withDVec4 v \_ y _ w -> dvec3 w y y

instance HasField "wyz" DVec4 DVec3 where
  {-# INLINE getField #-}
  getField v = withDVec4 v \_ y z w -> dvec3 w y z

instance HasField "wyw" DVec4 DVec3 where
  {-# INLINE getField #-}
  getField v = withDVec4 v \_ y _ w -> dvec3 w y w

instance HasField "wzx" DVec4 DVec3 where
  {-# INLINE getField #-}
  getField v = withDVec4 v \x _ z w -> dvec3 w z x

instance HasField "wzy" DVec4 DVec3 where
  {-# INLINE getField #-}
  getField v = withDVec4 v \_ y z w -> dvec3 w z y

instance HasField "wzz" DVec4 DVec3 where
  {-# INLINE getField #-}
  getField v = withDVec4 v \_ _ z w -> dvec3 w z z

instance HasField "wzw" DVec4 DVec3 where
  {-# INLINE getField #-}
  getField v = withDVec4 v \_ _ z w -> dvec3 w z w

instance HasField "wwx" DVec4 DVec3 where
  {-# INLINE getField #-}
  getField v = withDVec4 v \x _ _ w -> dvec3 w w x

instance HasField "wwy" DVec4 DVec3 where
  {-# INLINE getField #-}
  getField v = withDVec4 v \_ y _ w -> dvec3 w w y

instance HasField "wwz" DVec4 DVec3 where
  {-# INLINE getField #-}
  getField v = withDVec4 v \_ _ z w -> dvec3 w w z

instance HasField "www" DVec4 DVec3 where
  {-# INLINE getField #-}
  getField v = withDVec4 v \_ _ _ w -> dvec3 w w w