mirror of
https://github.com/Ttanasart-pt/Pixel-Composer.git
synced 2024-11-14 06:23:55 +01:00
8 lines
186 B
Plaintext
8 lines
186 B
Plaintext
|
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)];
|
||
|
}
|