Scratch for Java

Utils::rotateXY()

Rotates a point (x, y) around a specified origin (originX, originY) by a given angle in degrees.

Syntax

Java

.rotateXY(x, y, originX, originY, degrees)

Parameters

Name Data Type Description
x double the x-coordinate of the point to be rotated
y double the y-coordinate of the point to be rotated
originX double the x-coordinate of the origin point around which to rotate
originY double the y-coordinate of the origin point around which to rotate
degrees double the angle in degrees by which to rotate the point

Return

double[]

rotateXY()