vectorDirection

Convert angle to direction vector. Use when moving an object at a given angle.

@safe nothrow pure
vectorDirection
(
T
)
()

Parameters

angle T

Angle.

Examples

Vecf vecd = vectorDirection(45.from!(Degrees,Radians));
position += vecd * 5; // Move the object 45 degrees at a given speed.

Meta