Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace Size3 with Vector3 #872

Merged
merged 1 commit into from
May 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 1 addition & 53 deletions source/MonoGame.Extended/Math/Point3.cs
Original file line number Diff line number Diff line change
Expand Up @@ -232,58 +232,6 @@ public static Vector3 Displacement(Point3 point2, Point3 point1)
return vector;
}

/// <summary>
/// Translates a <see cref='Point3' /> by a given <see cref='Size3' />.
/// </summary>
/// <param name="point">The point.</param>
/// <param name="size">The size.</param>
/// <returns>
/// The result of the operator.
/// </returns>
public static Point3 operator +(Point3 point, Size3 size)
{
return Add(point, size);
}

/// <summary>
/// Translates a <see cref='Point3' /> by a given <see cref='Size3' />.
/// </summary>
/// <param name="point">The point.</param>
/// <param name="size">The size.</param>
/// <returns>
/// The result of the operator.
/// </returns>
public static Point3 Add(Point3 point, Size3 size)
{
return new Point3(point.X + size.Width, point.Y + size.Height, point.Z + size.Depth);
}

/// <summary>
/// Translates a <see cref='Point3' /> by the negative of a given <see cref='Size3' />.
/// </summary>
/// <param name="point">The point.</param>
/// <param name="size">The size.</param>
/// <returns>
/// The result of the operator.
/// </returns>
public static Point3 operator -(Point3 point, Size3 size)
{
return Subtract(point, size);
}

/// <summary>
/// Translates a <see cref='Point3' /> by the negative of a given <see cref='Size3' /> .
/// </summary>
/// <param name="point">The point.</param>
/// <param name="size">The size.</param>
/// <returns>
/// The result of the operator.
/// </returns>
public static Point3 Subtract(Point3 point, Size3 size)
{
return new Point3(point.X - size.Width, point.Y - size.Height, point.Z - size.Depth);
}

/// <summary>
/// Returns a hash code of this <see cref="Point3" /> suitable for use in hashing algorithms and data
/// structures like a hash table.
Expand Down Expand Up @@ -376,4 +324,4 @@ public override string ToString()

internal string DebugDisplayString => ToString();
}
}
}
289 changes: 0 additions & 289 deletions source/MonoGame.Extended/Math/Size3.cs

This file was deleted.

Loading