summaryrefslogtreecommitdiff
path: root/honey/quaternion.lua
diff options
context:
space:
mode:
authorsanine-a <sanine.not@pm.me>2023-03-27 14:47:30 -0500
committersanine-a <sanine.not@pm.me>2023-03-27 14:47:30 -0500
commitcd3d4706da048076375f5899b9f893e108fed7fa (patch)
treeb30125513864abf0dd13e8e14049b8b0a17e283a /honey/quaternion.lua
parent7b7cc22d463ff04337e90959482c3643cd685676 (diff)
refactor: move glm classes into single filemain
Diffstat (limited to 'honey/quaternion.lua')
-rw-r--r--honey/quaternion.lua30
1 files changed, 0 insertions, 30 deletions
diff --git a/honey/quaternion.lua b/honey/quaternion.lua
deleted file mode 100644
index 6fbfdd5..0000000
--- a/honey/quaternion.lua
+++ /dev/null
@@ -1,30 +0,0 @@
-local glm = honey.glm
-local Mat4 = require "honey.mat4"
-
-local module = {}
-setmetatable(module, {__index=_G})
-setfenv(1, module)
-
-Quaternion = {}
-Quaternion.__index = Quaternion
-
-
-function Quaternion.new(_, tbl)
- local tbl = tbl or { 0, 0, 0, 0 }
- local self = {}
- self.data = glm.quat_create()
- glm.quat_init(self.data, unpack(tbl))
- setmetatable(self, Quaternion)
- return self
-end
-setmetatable(Quaternion, {__call=Quaternion.new})
-
-
-function Quaternion.toMat4(self)
- local m = Mat4()
- glm.quat_mat4(self.data, m.data)
- return m
-end
-
-
-return module.Quaternion