packages feed

simple-vec3 0.4.0.10 → 0.5

raw patch · 4 files changed

+20/−6 lines, 4 filesdep ~QuickCheckPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: QuickCheck

API changes (from Hackage documentation)

+ Data.Vec3: infixl 5 <->
+ Data.Vec3: infixl 6 .*
+ Data.Vec3: infixl 7 .^
+ Data.Vec3.Class: infixl 5 <->
+ Data.Vec3.Class: infixl 6 .*
+ Data.Vec3.Class: infixl 7 .^

Files

CHANGELOG.md view
@@ -1,11 +1,20 @@ # Changelog -## [0.4.0.10] - 2018-01-18+## [0.5] - 2019-06-11  ### Changed +- Operator precedence order is now as follows: `.^`, `.*`, `<+>`,+  `<->`, `><` (multiplication binds most tightly).+ - Test suite dependencies bump +## [0.4.0.10] - 2019-01-18++### Changed++- Test suite dependencies bump+ ## [0.4.0.9] - 2018-10-29  ### Changed@@ -118,6 +127,7 @@  ## [0.1.0.0] - 2012-12-05 +[0.5]:     https://github.com/dzhus/simple-vec3/compare/0.4.0.10...0.5 [0.4.0.10]:https://github.com/dzhus/simple-vec3/compare/0.4.0.9...0.4.0.10 [0.4.0.9]: https://github.com/dzhus/simple-vec3/compare/0.4.0.8...0.4.0.9 [0.4.0.8]: https://github.com/dzhus/simple-vec3/compare/0.4.0.7...0.4.0.8
simple-vec3.cabal view
@@ -1,6 +1,6 @@ cabal-version: 1.12 name: simple-vec3-version: 0.4.0.10+version: 0.5 license: BSD3 license-file: LICENSE maintainer: dima@dzhus.org@@ -30,7 +30,7 @@     default-language: Haskell2010     ghc-options: -Wall -Wcompat -O2     build-depends:-        QuickCheck <2.13,+        QuickCheck <2.14,         base <5,         vector <0.13 
src/Data/Vec3/Class.hs view
@@ -1,7 +1,6 @@ {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE TypeFamilies #-}-{-# LANGUAGE TypeSynonymInstances #-}  module Data.Vec3.Class     ( Vec3(..)@@ -42,11 +41,13 @@     (<+>)          :: v -> v -> v     (<+>)          = zipWith (+)     {-# INLINE (<+>) #-}+    infixl 5 <+>      -- | Subtract two vectors.     (<->)          :: v -> v -> v     (<->)          = zipWith (-)     {-# INLINE (<->) #-}+    infixl 5 <->      -- | Cross product.     (><)           :: v -> v -> v@@ -56,18 +57,21 @@                       where                         (x1, y1, z1) = toXYZ v1                         (x2, y2, z2) = toXYZ v2+    infixl 6 ><      -- | Scale a vector.     (.^)           :: v -> Double -> v     (.^) v s        = fromXYZ (x * s, y * s, z * s)                       where                         (x, y, z) = toXYZ v+    infixl 7 .^      -- | Dot product.     (.*)           :: v -> v -> Double     (.*) v1 v2      = x + y + z                       where                         (x, y, z) = toXYZ $ zipWith (*) v1 v2+    infixl 6 .*      -- | Euclidean norm of a vector.     norm           :: v -> Double
tests/Main.hs view
@@ -58,10 +58,10 @@     (\(v :: ty) -> v .^ 1 <~=> v)   , testProperty     "Distributivity wrt vector addition"-    (\(a :: ty) b p -> ((a <+> b) .^ p) <~=> (a .^ p) <+> (b .^ p))+    (\(a :: ty) b p -> ((a <+> b) .^ p) <~=> a .^ p <+> b .^ p)   , testProperty     "Distributivity wrt scalar addition"-    (\(a :: ty) p q -> a .^ (p + q) <~=> (a .^ p) <+> (a .^ q))+    (\(a :: ty) p q -> a .^ (p + q) <~=> a .^ p <+> a .^ q)   , testProperty     "Subtraction definition"     (\(a :: ty) b -> a <+> invert b <~=> a <-> b)