mirror of
https://github.com/photonstorm/phaser
synced 2025-01-13 13:48:53 +00:00
13 lines
234 B
JavaScript
13 lines
234 B
JavaScript
|
var SetToAngle = function (line, x, y, angle, length)
|
||
|
{
|
||
|
line.x1 = x;
|
||
|
line.y1 = y;
|
||
|
|
||
|
line.x2 = x + (Math.cos(angle) * length);
|
||
|
line.y2 = y + (Math.sin(angle) * length);
|
||
|
|
||
|
return line;
|
||
|
};
|
||
|
|
||
|
module.exports = SetToAngle;
|