diff options
author | George Marques <george@gmarqu.es> | 2021-09-01 09:33:13 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-01 09:33:13 -0300 |
commit | 25ae27931758b5a74d30de52ea5601a91d2df7ae (patch) | |
tree | 673dbd00b79bf825f9f235ee17a4f8859d306039 /modules/mono/glue | |
parent | cf59028972e013128703033bc2ef1677098138bf (diff) | |
parent | 017c94222e3b88cb80da311e3e9c63eb3478463c (diff) |
Merge pull request #52270 from KoBeWi/goodbye_polar
Remove cartesian2polar and polar2cartesian
Diffstat (limited to 'modules/mono/glue')
-rw-r--r-- | modules/mono/glue/GodotSharp/GodotSharp/Core/Mathf.cs | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/Mathf.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/Mathf.cs index 213f84ad73..c8dd0ac9ce 100644 --- a/modules/mono/glue/GodotSharp/GodotSharp/Core/Mathf.cs +++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/Mathf.cs @@ -110,19 +110,6 @@ namespace Godot } /// <summary> - /// Converts a 2D point expressed in the cartesian coordinate - /// system (X and Y axis) to the polar coordinate system - /// (a distance from the origin and an angle). - /// </summary> - /// <param name="x">The input X coordinate.</param> - /// <param name="y">The input Y coordinate.</param> - /// <returns>A <see cref="Vector2"/> with X representing the distance and Y representing the angle.</returns> - public static Vector2 Cartesian2Polar(real_t x, real_t y) - { - return new Vector2(Sqrt(x * x + y * y), Atan2(y, x)); - } - - /// <summary> /// Rounds `s` upward (towards positive infinity). /// </summary> /// <param name="s">The number to ceil.</param> @@ -436,19 +423,6 @@ namespace Godot } /// <summary> - /// Converts a 2D point expressed in the polar coordinate - /// system (a distance from the origin `r` and an angle `th`) - /// to the cartesian coordinate system (X and Y axis). - /// </summary> - /// <param name="r">The distance from the origin.</param> - /// <param name="th">The angle of the point.</param> - /// <returns>A <see cref="Vector2"/> representing the cartesian coordinate.</returns> - public static Vector2 Polar2Cartesian(real_t r, real_t th) - { - return new Vector2(r * Cos(th), r * Sin(th)); - } - - /// <summary> /// Performs a canonical Modulus operation, where the output is on the range `[0, b)`. /// </summary> /// <param name="a">The dividend, the primary input.</param> |