QAngle
Struct QAngle
Namespace: SwiftlyS2.Shared.Natives
Assembly: SwiftlyS2.CS2.dll
QAngle is a type that contains 3 float, representing an angle. Degree Euler. Pitch, Yaw, Roll
public struct QAngleInherited Members
- object.Equals(object?)
- object.Equals(object?, object?)
- object.GetHashCode()
- object.GetType()
- object.ReferenceEquals(object?, object?)
- object.ToString()
Constructors
QAngle(float, float, float)
public QAngle(float pitch, float yaw, float roll)QAngle(QAngle)
public QAngle(QAngle other)- other QAngle
Fields
Pitch
public float PitchRoll
public float RollYaw
public float YawProperties
X
X-axis accessor for Pitch rotation (up/down).
public float X { readonly get; set; }This is just a mapped accessor to the Pitch field.
Y
Y-axis accessor for Yaw rotation (left/right).
public float Y { readonly get; set; }This is just a mapped accessor to the Yaw field.
Z
Z-axis accessor for Roll rotation (roll/tilt).
public float Z { readonly get; set; }This is just a mapped accessor to the Roll field.
Zero
public static QAngle Zero { get; }Methods
Equals(object?)
Indicates whether this instance and a specified object are equal.
public override readonly bool Equals(object? obj)- obj object? — The object to compare with the current instance.
- bool — true if
objand this instance are the same type and represent the same value; otherwise, false.
GetHashCode()
Returns the hash code for this instance.
public override readonly int GetHashCode()- int — A 32-bit signed integer that is the hash code for this instance.
ToDirectionVectors(out Vector, out Vector, out Vector)
Calculates forward, right, and up basis vectors that correspond to this angle.
Usage: angle.ToDirectionVectors(out var forward, out var right, out var up);
public readonly void ToDirectionVectors(out Vector forward, out Vector right, out Vector up)- forward Vector — Forward direction (X: north, Z: up).
- right Vector — Right direction.
- up Vector — Up direction.
ToRadianEuler()
public readonly RadianEuler ToRadianEuler()ToString()
Returns the fully qualified type name of this instance.
public override readonly string ToString()- string — The fully qualified type name.
Operators
operator +(QAngle, QAngle)
public static QAngle operator +(QAngle a, QAngle b)operator /(QAngle, QAngle)
public static QAngle operator /(QAngle a, QAngle b)operator /(QAngle, float)
public static QAngle operator /(QAngle a, float b)operator ==(QAngle, QAngle)
public static bool operator ==(QAngle a, QAngle b)operator !=(QAngle, QAngle)
public static bool operator !=(QAngle a, QAngle b)operator *(QAngle, QAngle)
public static QAngle operator *(QAngle a, QAngle b)operator *(QAngle, float)
public static QAngle operator *(QAngle a, float b)operator -(QAngle, QAngle)
public static QAngle operator -(QAngle a, QAngle b)operator -(QAngle)
public static QAngle operator -(QAngle a)- a QAngle