From 253e698cc422644e7d8ae4f51de479a44d3a63ab Mon Sep 17 00:00:00 2001 From: nek0 Date: Sun, 27 Dec 2020 02:31:10 +0100 Subject: [PATCH] commence physics implementation with mass --- src/Classes/Physics/Mass.hs | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 src/Classes/Physics/Mass.hs diff --git a/src/Classes/Physics/Mass.hs b/src/Classes/Physics/Mass.hs new file mode 100644 index 0000000..63bc0a1 --- /dev/null +++ b/src/Classes/Physics/Mass.hs @@ -0,0 +1,11 @@ +module Classes.Physics.Mass where + +-- | This typeclass is a centerpiece of the physics implementation and is used +-- to implement the basic mass properties of a (very simplified) physical body. +class Mass m where + + -- | The mass of the object + mass :: m -> Double + + -- | The scaling factor for how much this object is affected by gravity. + gravScale :: m -> Double