Documentation

Unity Engine


Unity Engine


CosSin

Calculate both the Cosine and Sine of the specified angle.
Read time 1 minuteLast updated a month ago

Definition

CosSin(float, float, float)

Calculate both the Cosine and Sine of the specified angle.
public static void CosSin(float angle, out float cosine, out float sine)

Parameters

angle

The angle to calculate, in radians.

cosine

The Cosine of the specified angle.

sine

The Sine of the specified angle.

CosSin(float)

Calculate both the Cosine and Sine of the specified angle.
public static Vector2 CosSin(float angle)

Parameters

angle

The angle to calculate, in radians.

Returns

Type

Description

Vector2A 2D vector where X is the Cosine and Y is the Sine of the specified angle.