mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-04 08:46:09 +00:00
Fix rotation inaccuracy (fix #3041)
This commit is contained in:
parent
1d3be8c2fa
commit
7b63651775
@ -69,9 +69,9 @@ PointF Transformation::rotatePoint(
|
||||
const double angle,
|
||||
const double skew)
|
||||
{
|
||||
double cos = std::cos(-angle);
|
||||
double sin = std::sin(-angle);
|
||||
double tan = std::tan(skew);
|
||||
double cos = std::roundl(std::cos(-angle)*100000.0)/100000.0;
|
||||
double sin = std::roundl(std::sin(-angle)*100000.0)/100000.0;
|
||||
double tan = std::roundl(std::tan(skew)*100000.0)/100000.0;
|
||||
double dx = point.x - pivot.x;
|
||||
double dy = point.y - pivot.y;
|
||||
dx += dy*tan;
|
||||
|
Loading…
Reference in New Issue
Block a user