Add Read/Show instance for Creature

This commit is contained in:
2022-07-22 10:44:54 +01:00
parent 4c5218c633
commit 6b69fc1684
35 changed files with 345 additions and 225 deletions
+16
View File
@@ -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