Skip to content

Commit

Permalink
Merge pull request #41 from Nairou/mat3
Browse files Browse the repository at this point in the history
Add 3x3 matrix
  • Loading branch information
kooparse authored Jan 14, 2024
2 parents e135bef + 1e0f679 commit 27013ef
Show file tree
Hide file tree
Showing 3 changed files with 457 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ pub fn main () void {
| Vec4_f64 | Four dimensional vector for `f64` |
| Vec4_i32 | Four dimensional vector for `i32` |
| Vec4_usize | Four dimensional vector for `usize` |
| Mat3 | 3x3 matrix for `f32` |
| Mat3_f64 | 3x3 matrix for `f64` |
| Mat4 | 4x4 matrix for `f32` |
| Mat4_f64 | 4x4 matrix for `f64` |
| Quat | Quaternion for `f32` |
Expand Down Expand Up @@ -127,8 +129,8 @@ Note: All matrices are column-major.
| lookAt | Construct a right-handed lookAt matrix from given position (eye) and target |
| mul | Multiply two matrices |
| inv | Inverse the given matrix |
| recompose | Return matrix from given `translation`, `rotation` and `scale` components |
| decompose | Return components `translation`, `rotation` and `scale` from given matrix. |
| recompose | Return mat4 matrix from given `translation`, `rotation` and `scale` components |
| decompose | Return components `translation`, `rotation` and `scale` from given 4x4 matrix. |
| debugPrint | Print the matrix data for debug purpose |

### Quaternions
Expand Down
1 change: 1 addition & 0 deletions src/main.zig
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const expectEqual = std.testing.expectEqual;
const math = std.math;

pub usingnamespace @import("generic_vector.zig");
pub usingnamespace @import("mat3.zig");
pub usingnamespace @import("mat4.zig");
pub usingnamespace @import("quaternion.zig");

Expand Down
Loading

0 comments on commit 27013ef

Please sign in to comment.