Skip to content
Merged
Prev Previous commit
Fix Typo
  • Loading branch information
Thurii committed Jul 8, 2018
commit 1a391128f9625040aa5b24c4f64b41e918c374ad
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ main =
let timestep = 0.01
n = 100
threshold = 0.01
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

adding a value for accFun:

accFun x = x - 3 * x * timestep
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sould the acceleration function be:

accFun x = -3 * x
checkResult' = checkResult threshold $ exp . (\x -> x - 3 * x * timestep)
checkResult' = checkResult threshold $ exp . (\x -> -3 * x * timestep)
in putStrLn $
if checkResult' (take n $ solveEuler kinematics timestep 1)
then "All values within threshold"
Expand Down