瀏覽代碼

* Fixing precision.

tags/v0.99.beta14
Sam Hocevar sam 18 年之前
父節點
當前提交
f62cea48fd
共有 1 個檔案被更改,包括 3 行新增3 行删除
  1. +3
    -3
      cucul/triangle.c

+ 3
- 3
cucul/triangle.c 查看文件

@@ -131,9 +131,9 @@ int cucul_fill_triangle(cucul_canvas_t *cv, int x1, int y1, int x2, int y2,
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(xa > xmax) continue;


Loading…
取消
儲存