mirror of
https://github.com/oliverbooth/VpSharp
synced 2024-11-22 19:38:47 +00:00
Offer Position in Coordinates struct
This commit is contained in:
parent
b1b9d59cfd
commit
703f099187
@ -92,6 +92,21 @@ public readonly partial struct Coordinates : IEquatable<Coordinates>, IFormattab
|
|||||||
/// </value>
|
/// </value>
|
||||||
public bool IsRelative { get; init; }
|
public bool IsRelative { get; init; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or initializes the position by accessing the <see cref="X" />, <see cref="Y" />, and <see cref="Z" /> properties.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The position encoded in these coordinates.</value>
|
||||||
|
public Vector3d Position
|
||||||
|
{
|
||||||
|
get => new(X, Y, Z);
|
||||||
|
init
|
||||||
|
{
|
||||||
|
X = value.X;
|
||||||
|
Y = value.Y;
|
||||||
|
Z = value.Z;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or initializes the world.
|
/// Gets or initializes the world.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -202,6 +217,6 @@ public readonly partial struct Coordinates : IEquatable<Coordinates>, IFormattab
|
|||||||
public string ToString(string? format, IFormatProvider? formatProvider = null)
|
public string ToString(string? format, IFormatProvider? formatProvider = null)
|
||||||
{
|
{
|
||||||
format ??= "{0}";
|
format ??= "{0}";
|
||||||
return Serializer.Serialize(this, format, formatProvider ?? CultureInfo.InvariantCulture);
|
return Serializer.Serialize(this, format, formatProvider ?? CultureInfo.InvariantCulture);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user