Table of Contents

Struct Angle

Namespace
Netick.Unity
Assembly
Netick.Unity.dll

A helper struct that represents an angle in degrees, which automatically wraps to [0, 360) range.

public struct Angle : IEquatable<Angle>
Implements
Inherited Members

Constructors

Angle(float)

Construct from raw degrees (auto-wrapped to [0, 360) internally).

public Angle(float degrees)

Parameters

degrees float

Properties

Value

public float Value { get; set; }

Property Value

float

Methods

CreateAngle(int*)

public static Angle CreateAngle(int* data)

Parameters

data int*

Returns

Angle

Equals(Angle)

public bool Equals(Angle other)

Parameters

other Angle

Returns

bool

Equals(object)

public override bool Equals(object obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

ToString()

public override string ToString()

Returns

string

Wrap(float)

public static float Wrap(float angle)

Parameters

angle float

Returns

float

Operators

operator +(Angle, Angle)

public static Angle operator +(Angle a, Angle b)

Parameters

a Angle
b Angle

Returns

Angle

operator /(Angle, float)

public static Angle operator /(Angle a, float scalar)

Parameters

a Angle
scalar float

Returns

Angle

implicit operator float(Angle)

public static implicit operator float(Angle a)

Parameters

a Angle

Returns

float

implicit operator Angle(float)

public static implicit operator Angle(float degrees)

Parameters

degrees float

Returns

Angle

operator *(Angle, float)

public static Angle operator *(Angle a, float scalar)

Parameters

a Angle
scalar float

Returns

Angle

operator -(Angle, Angle)

public static Angle operator -(Angle a, Angle b)

Parameters

a Angle
b Angle

Returns

Angle