2019-08-25 04:46:40 +00:00
|
|
|
#include "libultra_internal.h"
|
2020-05-07 18:21:22 +00:00
|
|
|
#include <string.h>
|
2019-08-25 04:46:40 +00:00
|
|
|
|
2020-05-07 18:21:22 +00:00
|
|
|
void guMtxF2L(float mf[4][4], Mtx *m) {
|
2020-06-02 16:44:34 +00:00
|
|
|
memcpy(m->m, mf, sizeof(Mtx));
|
2020-05-07 18:21:22 +00:00
|
|
|
}
|
2019-08-25 04:46:40 +00:00
|
|
|
|
|
|
|
void guMtxIdentF(float mf[4][4]) {
|
|
|
|
int r, c;
|
|
|
|
for (r = 0; r < 4; r++) {
|
|
|
|
for (c = 0; c < 4; c++) {
|
2019-09-01 19:50:50 +00:00
|
|
|
if (r == c) {
|
2019-08-25 04:46:40 +00:00
|
|
|
mf[r][c] = 1.0f;
|
2019-09-01 19:50:50 +00:00
|
|
|
} else {
|
2019-08-25 04:46:40 +00:00
|
|
|
mf[r][c] = 0.0f;
|
2019-09-01 19:50:50 +00:00
|
|
|
}
|
2019-08-25 04:46:40 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
void guMtxIdent(Mtx *m) {
|
2020-05-07 18:21:22 +00:00
|
|
|
guMtxIdentF(m->m);
|
2019-08-25 04:46:40 +00:00
|
|
|
}
|
2020-05-13 11:57:25 +00:00
|
|
|
|