summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--maths.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/maths.c b/maths.c
index 5ec40d7..db11491 100644
--- a/maths.c
+++ b/maths.c
@@ -229,6 +229,7 @@ int* vec_cpy(int* d, const int* s, int c) {
}
void persp(int* v, int asp) {
+ v[2] += !v[2];
v[0] = ((v[0] << fbits) / v[2]);
v[1] = ((v[1] << fbits) / v[2]) * asp >> fbits;
v[2] = f1;