GRAPHICS: Use correct data types
This commit is contained in:
parent
2785bdd8c1
commit
1ed98269ff
1 changed files with 2 additions and 2 deletions
|
@ -125,7 +125,7 @@ void drawThickLine2(int x1, int y1, int x2, int y2, int thick, int color, void (
|
||||||
/* 2.0.12: Michael Schwartz: divide rather than multiply;
|
/* 2.0.12: Michael Schwartz: divide rather than multiply;
|
||||||
TBB: but watch out for /0! */
|
TBB: but watch out for /0! */
|
||||||
if (dx != 0 && thick != 0) {
|
if (dx != 0 && thick != 0) {
|
||||||
double ac_recip = 1/dx * sqrt((double)(dx * dx + dy * dy)); // 1 / cos(atan2((double)dy, (double)dx));
|
double ac_recip = 1.0/dx * sqrt((double)(dx * dx + dy * dy)); // 1 / cos(atan2((double)dy, (double)dx));
|
||||||
wid = thick * ac_recip;
|
wid = thick * ac_recip;
|
||||||
} else {
|
} else {
|
||||||
wid = 1;
|
wid = 1;
|
||||||
|
@ -183,7 +183,7 @@ void drawThickLine2(int x1, int y1, int x2, int y2, int thick, int color, void (
|
||||||
/* 2.0.12: Michael Schwartz: divide rather than multiply;
|
/* 2.0.12: Michael Schwartz: divide rather than multiply;
|
||||||
TBB: but watch out for /0! */
|
TBB: but watch out for /0! */
|
||||||
if (dy != 0 && thick != 0) {
|
if (dy != 0 && thick != 0) {
|
||||||
double as_recip = 1/dy * sqrt((double)(dx * dx + dy * dy)); // 1 / sin(atan2((double)dy, (double)dx));
|
double as_recip = 1.0/dy * sqrt((double)(dx * dx + dy * dy)); // 1 / sin(atan2((double)dy, (double)dx));
|
||||||
wid = thick * as_recip;
|
wid = thick * as_recip;
|
||||||
} else {
|
} else {
|
||||||
wid = 1;
|
wid = 1;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue