mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Improve Matrix identity functions and add Quaternion to matrix function (#765)
* Edit matrix identity fn and add quaternion to matrix fn * Change matrix identity macros to constants --------- Co-authored-by: Tonis <tanton@paysure.solutions>
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
module math_matrix @test;
|
||||
import std::math;
|
||||
|
||||
|
||||
|
||||
fn void test_mat4()
|
||||
{
|
||||
{|
|
||||
Matrix4 mat = math::matrix4_indentity();
|
||||
Matrix4 mat = MATRIX4_IDENTITY;
|
||||
Matrix4 mat2 = { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1 };
|
||||
Matrix4 calc = mat.mul(mat2);
|
||||
assert(calc.m == mat.m);
|
||||
|
||||
Reference in New Issue
Block a user