Explorar o código

commit entered code for chapter 4

George C. Privon %!s(int64=2) %!d(string=hai) anos
pai
achega
1d12e1131c
Modificáronse 1 ficheiros con 12 adicións e 0 borrados
  1. 12 0
      04-motion/cv.hs

+ 12 - 0
04-motion/cv.hs

@@ -0,0 +1,12 @@
+type R = Double
+
+type Time           = R
+type TimeInterval   = R
+type Position       = R
+type Velocity       = R
+
+type PositionFunction = Time -> Position
+type VelocityFunction = Time -> Velocity
+
+positionCV :: Position -> Velocity -> Time -> Position
+positionCV x0 v0 t = v0 * t + x0