Files
loop/src/Dodge/Wall/Reflect.hs
T
2022-06-04 00:40:51 +01:00

16 lines
455 B
Haskell

module Dodge.Wall.Reflect
where
import Geometry
import Dodge.Data
reflDirWall :: Point2 -> Point2 -> Wall -> Float
reflDirWall sp ep wl = argV (reflectIn (uncurry (-.-) (_wlLine wl)) (ep -.- sp))
-- point free nonsense
reflVelWallDamp :: Float -> Wall -> Point2 -> Point2
reflVelWallDamp x = reflectInParam x . uncurry (-.-) . _wlLine
-- point free nonsense
reflVelWall :: Wall -> Point2 -> Point2
reflVelWall = reflectIn . uncurry (-.-) . _wlLine