HughPH.Box2D
Organised dotnet bindings for Box2D 3.1.0
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
Box2D.Rotation Struct Reference

Rotation expressed as a cosine and sine. More...

Inherits IEquatable< Rotation >.

Public Member Functions

 Rotation (float cos, float sin)
 Constructs a rotation from cosine and sine values.
 
 Rotation (float radians)
 Constructs a rotation from an angle in radians.
 
override string ToString ()
 Returns a string representation of the rotation.
 
float GetAngle ()
 Returns the angle of the rotation in radians.
 
bool Equals (Rotation other)
 Checks if this rotation is equal to another rotation.
 
override bool Equals (object? obj)
 Checks if this rotation is equal to another object.
 
override int GetHashCode ()
 Returns a hash code for this rotation.
 

Static Public Member Functions

static implicit operator Rotation ((float Cos, float Sin) tuple)
 Implicitly converts a tuple of (cos, sin) to a Rotation.
 
static implicit operator (float, float)(Rotation rotation)
 Implicitly converts a Rotation to a tuple of (cos, sin).
 
static implicit operator Rotation (float radians)
 Implicitly converts a float (angle in radians) to a Rotation.
 
static implicit operator float (Rotation rotation)
 Implicitly converts a Rotation to a float (angle in radians).
 

Public Attributes

float Cos
 Cosine component of the rotation.
 
float Sin
 Sine component of the rotation.
 

Static Public Attributes

static readonly Rotation Identity
 Identity rotation (0 degrees).
 

Detailed Description

Rotation expressed as a cosine and sine.


The documentation for this struct was generated from the following file: