Sha256: 20d0df6ce21d3c87047c05e59c98180edebb6000e0e9ccc63cf0f6478d7a0860
Contents?: true
Size: 808 Bytes
Versions: 66
Compression:
Stored size: 808 Bytes
Contents
module SpaceAge exposing (Planet(..), ageOn) type Planet = Mercury | Venus | Earth | Mars | Jupiter | Saturn | Uranus | Neptune earthYearInSeconds = 365.25 * 24 * 60 * 60 ageOn : Planet -> Float -> Float ageOn planet seconds = seconds / secondsPerYear planet secondsPerYear : Planet -> Float secondsPerYear planet = earthYearInSeconds * (case planet of Mercury -> 0.2408467 Venus -> 0.61519726 Earth -> 1 Mars -> 1.8808158 Jupiter -> 11.862615 Saturn -> 29.447498 Uranus -> 84.016846 Neptune -> 164.79132 )
Version data entries
66 entries across 66 versions & 1 rubygems