diff options
author | sanine-a <sanine.not@pm.me> | 2023-04-14 15:44:38 -0500 |
---|---|---|
committer | sanine-a <sanine.not@pm.me> | 2023-04-14 15:44:38 -0500 |
commit | 01a8b2a3d98f816b8b712a974f3d1e98f05152f5 (patch) | |
tree | 742c9375bd533c45f8ebd01278c336177ae614ab /honey/glm.lua | |
parent | 64194866e9a1d6991efc9f44a0e3075905ab6470 (diff) |
implement loading/saving entity db
Diffstat (limited to 'honey/glm.lua')
-rw-r--r-- | honey/glm.lua | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/honey/glm.lua b/honey/glm.lua index dada37f..3357815 100644 --- a/honey/glm.lua +++ b/honey/glm.lua @@ -42,7 +42,7 @@ end function Vec3.__tostring(self) - return string.format("Vec3[%.4f, %.4f, %.4f]", self[1], self[2], self[3]) + return string.format("Vec3{%.4f, %.4f, %.4f}", self[1], self[2], self[3]) end @@ -196,7 +196,7 @@ end --===== Mat4 =====-- -function Mat4.new(_, self, values) +function Mat4.new(_, values) local self = {} self.type = "mat4" self.data = glm.mat4_create() @@ -238,10 +238,10 @@ end function Mat4.__tostring(self) return string.format( - "/ %0.4f, %0.4f, %0.4f, %0.4f \\\n" .. - "| %0.4f, %0.4f, %0.4f, %0.4f |\n" .. - "| %0.4f, %0.4f, %0.4f, %0.4f |\n" .. - "\\ %0.4f, %0.4f, %0.4f, %0.4f /", + "Mat4{%0.4f, %0.4f, %0.4f, %0.4f, " .. + "%0.4f, %0.4f, %0.4f, %0.4f, " .. + "%0.4f, %0.4f, %0.4f, %0.4f, " .. + "%0.4f, %0.4f, %0.4f, %0.4f}", self[1][1], self[1][2], self[1][3], self[1][4], self[2][1], self[2][2], self[2][3], self[2][4], self[3][1], self[3][2], self[3][3], self[3][4], |