about summary refs log tree commit diff
path: root/src/Decals.cpp
diff options
context:
space:
mode:
authorNguyễn Gia Phong <mcsinyx@disroot.org>2023-03-25 03:06:07 +0900
committerNguyễn Gia Phong <mcsinyx@disroot.org>2023-03-25 03:06:07 +0900
commitd7f9a74f75ba0ce2167fa0e529a009becdcee7e3 (patch)
tree44ca81f0b389379e508fac54e4c6a08c28ad93b1 /src/Decals.cpp
parent107857d68babcbe01b45c6a8ba9c65b5c8df8b6f (diff)
downloadblackshades-d7f9a74f75ba0ce2167fa0e529a009becdcee7e3.tar.gz
Convert a few linear algebra functions to Zig
Diffstat (limited to 'src/Decals.cpp')
-rw-r--r--src/Decals.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/Decals.cpp b/src/Decals.cpp
index 8a6ab5e..e5971e4 100644
--- a/src/Decals.cpp
+++ b/src/Decals.cpp
@@ -52,12 +52,11 @@ int Decals::MakeDecal(int atype, XYZ location, float size, XYZ normal, int poly,
 		else if (major == 0)
 			right = {normal.z, 0.0f, 0.0f};
 	} else {
-		CrossProduct(axis[major], normal, &right);
+		right = crossProduct(axis[major], normal);
 	}
 
-    CrossProduct(normal, right, &up);
-    Normalise(&up);
-    Normalise(&right);
+	up = normalize(crossProduct(normal, right));
+	right = normalize(right);
 
 	float count;
 	float count2;