2019-08-25 06:46:40 +02:00
|
|
|
#include "libultra_internal.h"
|
2020-05-07 20:21:22 +02:00
|
|
|
#include <string.h>
|
2019-08-25 06:46:40 +02:00
|
|
|
|
2020-05-07 20:21:22 +02:00
|
|
|
void guMtxF2L(float mf[4][4], Mtx *m) {
|
|
|
|
memcpy(m, mf, sizeof(Mtx));
|
|
|
|
}
|
2019-08-25 06:46:40 +02: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 21:50:50 +02:00
|
|
|
if (r == c) {
|
2019-08-25 06:46:40 +02:00
|
|
|
mf[r][c] = 1.0f;
|
2019-09-01 21:50:50 +02:00
|
|
|
} else {
|
2019-08-25 06:46:40 +02:00
|
|
|
mf[r][c] = 0.0f;
|
2019-09-01 21:50:50 +02:00
|
|
|
}
|
2019-08-25 06:46:40 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
void guMtxIdent(Mtx *m) {
|
2020-05-13 13:57:25 +02:00
|
|
|
|
2020-05-07 20:21:22 +02:00
|
|
|
guMtxIdentF(m->m);
|
2020-05-13 13:57:25 +02:00
|
|
|
|
2019-08-25 06:46:40 +02:00
|
|
|
}
|
2020-05-13 13:57:25 +02:00
|
|
|
|