This website works better with JavaScript.
Home
Help
Sign In
cacalabs
/
libcaca
mirror of
https://github.com/cacalabs/libcaca.git
Watch
1
Star
0
Fork
0
Code
Issues
0
Releases
7
Wiki
Activity
Browse Source
* Fixing precision.
tags/v0.99.beta14
Sam Hocevar
sam
18 years ago
parent
05aa158fed
commit
f62cea48fd
1 changed files
with
3 additions
and
3 deletions
Unified View
Diff Options
Show Stats
Download Patch File
Download Diff File
+3
-3
cucul/triangle.c
+ 3
- 3
cucul/triangle.c
View File
@@ -131,9 +131,9 @@ int cucul_fill_triangle(cucul_canvas_t *cv, int x1, int y1, int x2, int y2,
xb = xa; xa = tmp;
xb = xa; xa = tmp;
}
}
/* Rescale xa and xb,
slightly cropping
*/
xa = xa / 4;
xb = xb / 4;
/* Rescale xa and xb,
recentering the division
*/
xa =
(
xa
+ 1)
/ 4;
xb =
(
xb
+ 2)
/ 4;
if(xb < 0) continue;
if(xb < 0) continue;
if(xa > xmax) continue;
if(xa > xmax) continue;
Write
Preview
Loading…
Cancel
Save