mirror of
https://github.com/Ttanasart-pt/Pixel-Composer.git
synced 2024-12-26 15:06:22 +01:00
8 lines
186 B
Text
8 lines
186 B
Text
|
function point_rotate(px, py, ox, oy, a) {
|
||
|
var cx = px - ox;
|
||
|
var cy = py - oy;
|
||
|
var d = -degtorad(a);
|
||
|
|
||
|
return [ox + cx * cos(d) - cy * sin(d),
|
||
|
oy + cx * sin(d) + cy * cos(d)];
|
||
|
}
|