mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-15 13:14:17 +01:00
feat: add implicit conversions to common vector types to Position3
This commit is contained in:
parent
a06f1b13d6
commit
84d1494b63
1 changed files with 12 additions and 0 deletions
|
|
@ -6,5 +6,17 @@ namespace Dalamud.Game.ClientState.Actors {
|
||||||
public float X;
|
public float X;
|
||||||
public float Z;
|
public float Z;
|
||||||
public float Y;
|
public float Y;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Convert this Position3 to a System.Numerics.Vector3
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pos">Position to convert.</param>
|
||||||
|
public static implicit operator System.Numerics.Vector3(Position3 pos) => new System.Numerics.Vector3(pos.X, pos.Y, pos.Z);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Convert this Position3 to a SharpDX.Vector3
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pos">Position to convert.</param>
|
||||||
|
public static implicit operator SharpDX.Vector3(Position3 pos) => new SharpDX.Vector3(pos.X, pos.Y, pos.Z);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue