summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorquou <quou@disroot.org>2024-07-13 23:38:53 +1000
committerquou <quou@disroot.org>2024-07-13 23:38:53 +1000
commit5f59b1517ef18d85e6dd05f2985e5a441deb5cac (patch)
treea9702f84da94cc149b5e7033cf78d8bd70d5f392
parentd848586c8aa8ff7d12601ba75f2a2bd9610f3500 (diff)
+y is up
-rw-r--r--maths.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/maths.c b/maths.c
index f6f1912..64e1a24 100644
--- a/maths.c
+++ b/maths.c
@@ -263,8 +263,8 @@ void persp(int* v, int asp) {
void ndc2clip(int* c, int* p) {
register int hw = c[2] >> 1;
register int hh = c[3] >> 1;
- p[0] = ((hw << fbits) * p[0]) >> fbits;
- p[1] = ((hh << fbits) * p[1]) >> fbits;
+ p[0] = ((hw << fbits) * p[0]) >> fbits;
+ p[1] = ((hh << fbits) * -p[1]) >> fbits;
p[0] >>= fbits;
p[1] >>= fbits;
p[0] += hw;