Module
Data.Vector3
- Package
- purescript-vectors
- Repository
- thought2/purescript-vectors
Types
Constructors
Destructors
Vector Modifiers
Componentwise Operations
Component Modifiers
Lens API
#Vec Source
data Vec aPolymorphic 3D vector
Constructors
Vec a a a
Instances
Generic (Vec a) _(Eq a) => Eq (Vec a)(Ord a) => Ord (Vec a)Functor VecFoldable VecTraversable Vec(Show a) => Show (Vec a)(Semiring a) => Semiring (Vec a)Componentwise
Semiringimplementation> Vec 2 3 7 * Vec 4 5 2 Vec 8 15 14(Ring a) => Ring (Vec a)Applicative VecApply VecZippy
Applyimplementation> (<>) <$> Vec "A" "B" "C" <*> Vec "1" "2" "3" Vec "A1" "B2" "C3"
#vdiv Source
vdiv :: forall a. EuclideanRing a => Vec a -> Vec a -> Vec aDivides two vectors componentwise.
This exists because there cannot be an EuclideanRing instance for Vec
> vdiv (Vec 9 6 4) (Vec 3 2 4)
Vec 3 3 1
#vmod Source
vmod :: forall a. EuclideanRing a => Vec a -> Vec a -> Vec aComponentwise Modulo operation
This exists because there cannot be an EuclideanRing instance for Vec
> mod (Vec 12 120 1200) (Vec 120 100 1000)
Vec 2 20 200
#half Source
half :: forall a. EuclideanRing a => Vec a -> Vec aHalves the amount of each component
> half (Vec 10 100 1000)
Vec 5 50 500
#twice Source
twice :: forall a. EuclideanRing a => Vec a -> Vec aDuplicates the amount of each component
> twice (Vec 10 100 1000)
Vec 20 200 2000
- Modules
- Data.
Vector2 - Data.
Vector3
Creates a vector from three components