summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;