Cleanup, move bullet spawn random offset to muzzle

This commit is contained in:
2025-07-05 20:55:24 +01:00
parent 164499fe4e
commit 7b9c1678f1
5 changed files with 34 additions and 83 deletions
+5
View File
@@ -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