Show / Hide Table of Contents

Struct Rotation

Represents an rotation in the x-y plane. Despite the fact this is labelled rotation, it also includes reflections as well.

Implements
IEquatable<Rotation>
Namespace: DeBroglie.Rot
Assembly: DeBroglie.dll
Syntax
public struct Rotation : IEquatable<Rotation>

Constructors

| Edit this page View Source

Rotation(int, bool)

Declaration
public Rotation(int rotateCw = 0, bool reflectX = false)
Parameters
Type Name Description
int rotateCw
bool reflectX

Properties

| Edit this page View Source

IsIdentity

True for the default constructed rotation, that doesn't do anything.

Declaration
public bool IsIdentity { get; }
Property Value
Type Description
bool
| Edit this page View Source

ReflectX

If true, this "rotation" also includes a reflection along the x-axis. The reflection is applied before doing any rotation by RotateCw.

Declaration
public bool ReflectX { get; }
Property Value
Type Description
bool
| Edit this page View Source

RotateCw

Rotation in degrees, clockwise (assuming a y-down co-ordinate system, typically used for 2d graphics).

Declaration
public int RotateCw { get; }
Property Value
Type Description
int

Methods

| Edit this page View Source

Equals(Rotation)

Declaration
public bool Equals(Rotation other)
Parameters
Type Name Description
Rotation other
Returns
Type Description
bool
| Edit this page View Source

Equals(object)

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
object obj
Returns
Type Description
bool
Overrides
ValueType.Equals(object)
| Edit this page View Source

GetHashCode()

Declaration
public override int GetHashCode()
Returns
Type Description
int
Overrides
ValueType.GetHashCode()
| Edit this page View Source

Inverse()

Returns the rotation that rotates back from this one. i.e. r.Inverse() * r gives the identity rotation for all Rotation objects.

Declaration
public Rotation Inverse()
Returns
Type Description
Rotation
| Edit this page View Source

ToString()

Declaration
public override string ToString()
Returns
Type Description
string
Overrides
ValueType.ToString()

Operators

| Edit this page View Source

operator ==(Rotation, Rotation)

Declaration
public static bool operator ==(Rotation a, Rotation b)
Parameters
Type Name Description
Rotation a
Rotation b
Returns
Type Description
bool
| Edit this page View Source

operator !=(Rotation, Rotation)

Declaration
public static bool operator !=(Rotation a, Rotation b)
Parameters
Type Name Description
Rotation a
Rotation b
Returns
Type Description
bool
| Edit this page View Source

operator *(Rotation, Rotation)

Returns the rotation which is equivalent to rotating first by b, then by a.

Declaration
public static Rotation operator *(Rotation a, Rotation b)
Parameters
Type Name Description
Rotation a
Rotation b
Returns
Type Description
Rotation

Implements

IEquatable<T>
  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX