packages feed

Hipmunk-Utils 0.1.0.0 → 0.1.1.0

raw patch · 3 files changed

+30/−3 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ Physics.Hipmunk.Utils: addForce :: Body -> V2 Double -> V2 Double -> IO ()
+ Physics.Hipmunk.Utils: addImpulse :: Body -> V2 Double -> V2 Double -> IO ()
+ Physics.Hipmunk.Utils: getForce :: Body -> IO (V2 Double)
+ Physics.Hipmunk.Utils: getPosition :: Body -> IO (V2 Double)
+ Physics.Hipmunk.Utils: getVelocity :: Body -> IO (V2 Double)

Files

Hipmunk-Utils.cabal view
@@ -1,5 +1,5 @@ name:                Hipmunk-Utils-version:             0.1.0.0+version:             0.1.1.0 synopsis:            Useful functions for Hipmunk description:         Pack some functions for Hipmunk using Linear package homepage:            https://github.com/suzumiyasmith/Hipmunk-Utils#readme@@ -7,8 +7,8 @@ license-file:        LICENSE author:              Suzumiya maintainer:          suzumiyasmith@gmail.com-copyright:           2017 Suzumiya-category:            Web+copyright:           Copyright (C) 2016-2017 Suzumiya+category:            Physics, Game build-type:          Simple extra-source-files:  README.md cabal-version:       >=1.10
README.md view
@@ -1,1 +1,7 @@ # Hipmunk-Utils++[![BSD3 License](http://img.shields.io/badge/license-BSD3-brightgreen.svg)](https://tldrlegal.com/license/bsd-3-clause-license-%28revised%29)++### Releases+[![Hackage](https://img.shields.io/hackage/v/Hipmunk-Utils.svg)](https://hackage.haskell.org/package/Hipmunk-Utils)+[![Dependencies](https://img.shields.io/hackage-deps/v/Hipmunk-Utils.svg)](http://packdeps.haskellers.com/feed?needle=Hipmunk-Utils)
src/Physics/Hipmunk/Utils.hs view
@@ -33,3 +33,24 @@  polygon :: [V2 Double] -> ShapeType polygon = Polygon . fmap (\(V2 x y) -> Vector x y)++addImpulse :: Body -> V2 Double -> V2 Double -> IO ()+addImpulse b (V2 x1 x2) (V2 y1 y2) = applyImpulse b (Vector x1 x2) (Vector y1 y2)++addForce :: Body -> V2 Double -> V2 Double -> IO ()+addForce b (V2 x1 x2) (V2 y1 y2) = applyForce b (Vector x1 x2) (Vector y1 y2)++getPosition :: Body -> IO (V2 Double)+getPosition b = do+  (Vector x y) <- get $ position b+  return $ V2 x y++getVelocity :: Body -> IO (V2 Double)+getVelocity b = do+  (Vector x y) <- get $ velocity b+  return $ V2 x y++getForce :: Body -> IO (V2 Double)+getForce b = do+  (Vector x y) <- get $ force b+  return $ V2 x y