QAngle
Structpublic struct QAngleQAngle is a type that contains 3 float, representing an angle. Degree Euler. Pitch, Yaw, Roll
View sourceConstructors
Properties
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-axis accessor for Yaw rotation (left/right).
public float Y { readonly get; set; }This is just a mapped accessor to the Yaw field.
Z-axis accessor for Roll rotation (roll/tilt).
public float Z { readonly get; set; }This is just a mapped accessor to the Roll field.
Methods
Deserializes the qangle from a string. Example input: "100 200 300"
public static QAngle Deserialize(string input, IFormatProvider? formatProvider = null)- inputstringSerialized qangle in string.
- formatProviderIFormatProvider?optionalFormat provider to use for the string. Null for default provider.
- FormatExceptionThrown when the input string is not in the correct format.
Indicates whether this instance and a specified object are equal.
public override readonly bool Equals(object? obj)- objobject?The object to compare with the current instance.
Returns the hash code for this instance.
public override readonly int GetHashCode()Serializes the qangle to a string. Example return: "100 200 300"
public readonly string Serialize(IFormatProvider? formatProvider = null)- formatProviderIFormatProvider?optionalFormat provider to use for the string. Null for default provider.
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)Returns the fully qualified type name of this instance.
public override readonly string ToString()Tries to deserialize the qangle from a string. Example input: "100 200 300"
public static bool TryDeserialize(string? input, out QAngle qangle)Tries to deserialize the qangle from a string. Example input: "100 200 300"
public static bool TryDeserialize(string? input, IFormatProvider? provider, out QAngle qangle)- inputstring?Serialized qangle in string.
- providerIFormatProvider?Format provider to use for the string. Null for default provider.
- qangleQAngleDeserialized qangle.
Fields
Operators
public static QAngle operator +(QAngle a, QAngle b)public static QAngle operator /(QAngle a, QAngle b)public static QAngle operator /(QAngle a, float b)public static bool operator ==(QAngle a, QAngle b)public static bool operator !=(QAngle a, QAngle b)public static QAngle operator *(QAngle a, QAngle b)public static QAngle operator *(QAngle a, float b)public static QAngle operator -(QAngle a, QAngle b)