{-# LANGUAGE BangPatterns #-}
module Dodge.ShiftPoint where
import Geometry

shiftPointBy :: (Point2,Float) -> Point2 -> Point2
shiftPointBy (pos,rot) !p = pos +.+ rotateV rot p

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)
