Move towards unifying door movement
This commit is contained in:
@@ -1,12 +1,14 @@
|
||||
{-# LANGUAGE BangPatterns #-}
|
||||
|
||||
module Dodge.ShiftPoint where
|
||||
|
||||
import Geometry
|
||||
|
||||
shiftPointBy :: (Point2,Float) -> Point2 -> Point2
|
||||
shiftPointBy (pos,rot) !p = pos +.+ rotateV rot p
|
||||
shiftPointBy :: Point2A -> Point2 -> Point2
|
||||
shiftPointBy (pos, rot) !p = pos +.+ rotateV rot p
|
||||
|
||||
invShiftPointBy :: (Point2,Float) -> Point2 -> Point2
|
||||
invShiftPointBy (p1,r) p2 = rotateV (-r) $ p2 -.- p1
|
||||
invShiftPointBy :: (Point2, Float) -> Point2 -> Point2
|
||||
invShiftPointBy (p1, r) p2 = rotateV (- r) $ p2 -.- p1
|
||||
|
||||
shiftPoint3By :: (Point2,Float) -> Point3 -> Point3
|
||||
shiftPoint3By (pos,rot) (V3 x y z) = addZ z $ pos +.+ rotateV rot (V2 x y)
|
||||
shiftPoint3By :: (Point2, Float) -> Point3 -> Point3
|
||||
shiftPoint3By (pos, rot) (V3 x y z) = addZ z $ pos +.+ rotateV rot (V2 x y)
|
||||
|
||||
Reference in New Issue
Block a user