1
0
Fork 0
mirror of https://github.com/Ellpeck/MLEM.git synced 2024-11-22 20:58:34 +01:00

Rename vector floor extensions to FloorCopy since MonoGame added their own Floors

This commit is contained in:
Ellpeck 2020-07-27 00:24:49 +02:00
parent 00ce8bb229
commit 433299ed10
2 changed files with 4 additions and 4 deletions

View file

@ -60,7 +60,7 @@ namespace MLEM.Cameras {
var sc = this.ActualScale; var sc = this.ActualScale;
var pos = -this.Position * sc; var pos = -this.Position * sc;
if (this.roundPosition) if (this.roundPosition)
pos = pos.Floor(); pos = pos.FloorCopy();
return Matrix.CreateScale(sc, sc, 1) * Matrix.CreateTranslation(new Vector3(pos, 0)); return Matrix.CreateScale(sc, sc, 1) * Matrix.CreateTranslation(new Vector3(pos, 0));
} }
} }

View file

@ -45,17 +45,17 @@ namespace MLEM.Extensions {
} }
/// <inheritdoc cref="Math.Floor(decimal)"/> /// <inheritdoc cref="Math.Floor(decimal)"/>
public static Vector2 Floor(this Vector2 vec) { public static Vector2 FloorCopy(this Vector2 vec) {
return new Vector2(vec.X.Floor(), vec.Y.Floor()); return new Vector2(vec.X.Floor(), vec.Y.Floor());
} }
/// <inheritdoc cref="Math.Floor(decimal)"/> /// <inheritdoc cref="Math.Floor(decimal)"/>
public static Vector3 Floor(this Vector3 vec) { public static Vector3 FloorCopy(this Vector3 vec) {
return new Vector3(vec.X.Floor(), vec.Y.Floor(), vec.Z.Floor()); return new Vector3(vec.X.Floor(), vec.Y.Floor(), vec.Z.Floor());
} }
/// <inheritdoc cref="Math.Floor(decimal)"/> /// <inheritdoc cref="Math.Floor(decimal)"/>
public static Vector4 Floor(this Vector4 vec) { public static Vector4 FloorCopy(this Vector4 vec) {
return new Vector4(vec.X.Floor(), vec.Y.Floor(), vec.Z.Floor(), vec.W.Floor()); return new Vector4(vec.X.Floor(), vec.Y.Floor(), vec.Z.Floor(), vec.W.Floor());
} }