Added unproject
Broken and buggy font stuff Fixed some typos Fixed draw rect not using dim properly
This commit is contained in:
@@ -18,6 +18,11 @@ R2f R2F(V2f min, V2f max) {
|
||||
return result;
|
||||
}
|
||||
|
||||
V2f V2f_Scale(V2f x, F32 s) {
|
||||
V2f result = { x.x * s, x.y * s };
|
||||
return result;
|
||||
}
|
||||
|
||||
V3f V3f_Neg(V3f x) {
|
||||
V3f result = { -x.x, -x.y, -x.z };
|
||||
return result;
|
||||
@@ -28,6 +33,11 @@ V3f V3f_Scale(V3f x, F32 s) {
|
||||
return result;
|
||||
}
|
||||
|
||||
V3f V3f_Sub(V3f a, V3f b) {
|
||||
V3f result = { a.x - b.x, a.y - b.y, a.z - b.z };
|
||||
return result;
|
||||
}
|
||||
|
||||
F32 V3f_Dot(V3f a, V3f b) {
|
||||
F32 result = (a.x * b.x) + (a.y * b.y) + (a.z * b.z);
|
||||
return result;
|
||||
@@ -140,7 +150,7 @@ Mat4x4FInv M4x4F_CameraView(V3f x, V3f y, V3f z, V3f p) {
|
||||
//
|
||||
V3f ix = V3f_Scale(x, 1.0f / V3f_Dot(x, x));
|
||||
V3f iy = V3f_Scale(y, 1.0f / V3f_Dot(y, y));
|
||||
V3f iz = V3f_Scale(z, 1.0f / V3f_Dot(z, y));
|
||||
V3f iz = V3f_Scale(z, 1.0f / V3f_Dot(z, z));
|
||||
|
||||
// Calculate inverse position
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user