mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Added Matrix identity macros and few matrix unit tests (#742)
* Add matrix identity macros * Add matrix some matrix unit tests --------- Co-authored-by: Tonis <tanton@paysure.solutions>
This commit is contained in:
@@ -105,6 +105,9 @@ define matrix4_ortho = matrix::ortho<double>;
|
||||
define matrix4_perspective = matrix::perspective<double>;
|
||||
define matrix4f_ortho = matrix::ortho<float>;
|
||||
define matrix4f_perspective = matrix::perspective<float>;
|
||||
macro Matrix4 matrix4_indentity() => { .m = { [0] = 1, [5] = 1, [10] = 1, [15] = 1 } };
|
||||
macro Matrix3 matrix3_indentity() => { .m = { [0] = 1, [4] = 1, [8] = 1 } };
|
||||
macro Matrix2 matrix2_indentity() => { .m = { [0] = 1, [3] = 1 } };
|
||||
|
||||
/**
|
||||
* @require types::is_numerical($typeof(x)) `The input must be a numerical value or numerical vector`
|
||||
|
||||
Reference in New Issue
Block a user