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