Cleanup, move bullet spawn random offset to muzzle
This commit is contained in:
@@ -13,12 +13,14 @@ module Quaternion (
|
||||
qID,
|
||||
qToV3,
|
||||
qToV2,
|
||||
qToAng,
|
||||
rotateToZ,
|
||||
vToQuat,
|
||||
comp,
|
||||
module Linear.Quaternion,
|
||||
) where
|
||||
|
||||
import Geometry.Vector
|
||||
import Data.Aeson
|
||||
import Geometry.Data
|
||||
import Geometry.Vector3D
|
||||
@@ -52,6 +54,9 @@ qToV3 q = Q.rotate q (V3 1 0 0)
|
||||
qToV2 :: Q.Quaternion Float -> Point2
|
||||
qToV2 = (\(V3 x y _) -> V2 x y) . qToV3
|
||||
|
||||
qToAng :: Quaternion Float -> Float
|
||||
qToAng = argV . qToV2
|
||||
|
||||
qID :: Q.Quaternion Float
|
||||
qID = Q.axisAngle (V3 1 0 0) 0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user