Scratch for Java

Vector2::direction()

Returns the direction of the vector in Scratch's degrees: 0 points up, 90 to the right, 180 down and 270 to the left, the way setDirection on a sprite counts. angle() counts the mathematical way instead (0 to the right, anticlockwise).

Syntax

Java

.direction()

Return

double

direction()

Create Shareable URL

Select Sections