Add Read/Show instance for Creature
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
module Dodge.FloatFunction where
|
||||
import Dodge.Data.FloatFunction
|
||||
|
||||
doFloatFloat :: FloatFloat -> Float -> Float
|
||||
doFloatFloat ff x = case ff of
|
||||
FloatID -> x
|
||||
FloatConst y -> y
|
||||
FloatFOV a
|
||||
| abs x < 0.5 * a -> 1
|
||||
| otherwise -> 0
|
||||
FloatLessCheck y
|
||||
| x > y -> 0
|
||||
| otherwise -> 1
|
||||
FloatAbsCheckGreaterLess a y1 y2
|
||||
| abs x > a -> y1
|
||||
| otherwise -> y2
|
||||
Reference in New Issue
Block a user