packages feed

simple-vec3 0.5 → 0.6

raw patch · 3 files changed

+14/−6 lines, 3 files

Files

CHANGELOG.md view
@@ -1,5 +1,12 @@ # Changelog +## [0.6] - 2019-06-12++### Changed++- simple-vec3 operators now bind tighter than `*` for `Num`, so you+  can write `2 * v .* d`.+ ## [0.5] - 2019-06-11  ### Changed@@ -127,6 +134,7 @@  ## [0.1.0.0] - 2012-12-05 +[0.6]:     https://github.com/dzhus/simple-vec3/compare/0.5...0.6 [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
simple-vec3.cabal view
@@ -1,6 +1,6 @@ cabal-version: 1.12 name: simple-vec3-version: 0.5+version: 0.6 license: BSD3 license-file: LICENSE maintainer: dima@dzhus.org
src/Data/Vec3/Class.hs view
@@ -41,13 +41,13 @@     (<+>)          :: v -> v -> v     (<+>)          = zipWith (+)     {-# INLINE (<+>) #-}-    infixl 5 <+>+    infixl 7 <+>      -- | Subtract two vectors.     (<->)          :: v -> v -> v     (<->)          = zipWith (-)     {-# INLINE (<->) #-}-    infixl 5 <->+    infixl 7 <->      -- | Cross product.     (><)           :: v -> v -> v@@ -57,21 +57,21 @@                       where                         (x1, y1, z1) = toXYZ v1                         (x2, y2, z2) = toXYZ v2-    infixl 6 ><+    infixl 8 ><      -- | Scale a vector.     (.^)           :: v -> Double -> v     (.^) v s        = fromXYZ (x * s, y * s, z * s)                       where                         (x, y, z) = toXYZ v-    infixl 7 .^+    infixl 9 .^      -- | Dot product.     (.*)           :: v -> v -> Double     (.*) v1 v2      = x + y + z                       where                         (x, y, z) = toXYZ $ zipWith (*) v1 v2-    infixl 6 .*+    infixl 8 .*      -- | Euclidean norm of a vector.     norm           :: v -> Double