where
-- | epsilon is the value that will be used in all tests that require
--- some measure of "closeness." Increasing it will make those tests
--- more tolerant.
+-- some measure of \"closeness.\" Increasing it will make those
+-- tests more tolerant.
epsilon :: Double
epsilon = 0.0001
import Cardinal
-- | The FunctionValues type represents the value of our function f at
--- the 27 points surrounding the center of a cube. Each value of f
--- can be accessed by the name of its direction.
+-- the 27 points surrounding (and including) the center of a
+-- cube. Each value of f can be accessed by the name of its
+-- direction.
data FunctionValues =
FunctionValues { front :: Double,
back :: Double,
-- FunctionValues type. Given a 'Cardinal' direction and a
-- 'FunctionValues' object, eval will return the value of the
-- function f in that 'Cardinal' direction. Note that 'Cardinal' can
--- be a composite type; eval is what performs the "arithmetic" on
+-- be a composite type; eval is what performs the \"arithmetic\" on
-- 'Cardinal' directions.
eval :: FunctionValues -> Cardinal -> Double
eval f F = front f