Skip to content

Commit

Permalink
Fixed Size ToRelative and ToScaled being swapped around
Browse files Browse the repository at this point in the history
  • Loading branch information
justalemon committed Dec 16, 2023
1 parent 62b65cd commit 2b7bd9d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions LemonUI/Tools/Extensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,13 @@ public static class Extensions
/// </summary>
/// <param name="size">The scaled SizeF.</param>
/// <returns>A new SizeF with relative values.</returns>
public static SizeF ToRelative(this SizeF size) => new SizeF(size.Width.ToXScaled(), size.Height.ToYScaled());
public static SizeF ToRelative(this SizeF size) => new SizeF(size.Width.ToXRelative(), size.Height.ToYRelative());
/// <summary>
/// Converts a relative 0-1 position into a scaled one.
/// </summary>
/// <param name="size">The relative SizeF.</param>
/// <returns>A new SizeF with scaled values.</returns>
public static SizeF ToScaled(this SizeF size) => new SizeF(size.Width.ToXRelative(), size.Height.ToYRelative());
public static SizeF ToScaled(this SizeF size) => new SizeF(size.Width.ToXScaled(), size.Height.ToYScaled());

#endregion
}
Expand Down

0 comments on commit 2b7bd9d

Please sign in to comment.