Skip to content

Class SimpleRotationExtensions

Definition

Namespace: StardewUI.Graphics
Assembly: StardewUI.dll

Helper extensions for the SimpleRotation type.

public static class SimpleRotationExtensions

Inheritance
Object ⇦ SimpleRotationExtensions

Members

Methods

Name Description
Angle(SimpleRotation) Gets the angle of a rotation, in radians.
IsQuarter(SimpleRotation) Gets whether a rotation is a quarter turn.

Details

Methods

Angle(SimpleRotation)

Gets the angle of a rotation, in radians.

public static float Angle(StardewUI.Graphics.SimpleRotation rotation);
Parameters

rotation   SimpleRotation
The rotation type.

Returns

Single

The angle of the rotation, in radians.


IsQuarter(SimpleRotation)

Gets whether a rotation is a quarter turn.

public static bool IsQuarter(StardewUI.Graphics.SimpleRotation rotation);
Parameters

rotation   SimpleRotation
The rotation type.

Returns

Boolean

true if the current instance is one of QuarterClockwise or QuarterCounterclockwise; otherwise false.

Remarks

Often used to check whether to invert X/Y values in measurements.