Skip to content

Commit

Permalink
Various fixes to C# documentation
Browse files Browse the repository at this point in the history
(cherry picked from commit 2deabd5)
  • Loading branch information
raulsntos authored and akien-mga committed Dec 8, 2021
1 parent 9968d0f commit ffbd595
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 14 deletions.
2 changes: 1 addition & 1 deletion modules/mono/glue/GodotSharp/GodotSharp/Core/Mathf.cs
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,7 @@ public static int StepDecimals(real_t step)
/// </summary>
/// <param name="s">The value to stepify.</param>
/// <param name="step">The step size to snap to.</param>
/// <returns></returns>
/// <returns>The snapped value.</returns>
public static real_t Stepify(real_t s, real_t step)
{
if (step != 0f)
Expand Down
8 changes: 4 additions & 4 deletions modules/mono/glue/GodotSharp/GodotSharp/Core/MathfEx.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public static int DecimalCount(real_t s)
/// <summary>
/// Returns the amount of digits after the decimal place.
/// </summary>
/// <param name="s">The input <see cref="decimal"/> value.</param>
/// <param name="s">The input <see langword="decimal"/> value.</param>
/// <returns>The amount of digits.</returns>
public static int DecimalCount(decimal s)
{
Expand All @@ -54,7 +54,7 @@ public static int DecimalCount(decimal s)
/// <summary>
/// Rounds <paramref name="s"/> upward (towards positive infinity).
///
/// This is the same as <see cref="Ceil(real_t)"/>, but returns an <c>int</c>.
/// This is the same as <see cref="Ceil(real_t)"/>, but returns an <see langword="int"/>.
/// </summary>
/// <param name="s">The number to ceil.</param>
/// <returns>The smallest whole number that is not less than <paramref name="s"/>.</returns>
Expand All @@ -66,7 +66,7 @@ public static int CeilToInt(real_t s)
/// <summary>
/// Rounds <paramref name="s"/> downward (towards negative infinity).
///
/// This is the same as <see cref="Floor(real_t)"/>, but returns an <c>int</c>.
/// This is the same as <see cref="Floor(real_t)"/>, but returns an <see langword="int"/>.
/// </summary>
/// <param name="s">The number to floor.</param>
/// <returns>The largest whole number that is not more than <paramref name="s"/>.</returns>
Expand All @@ -78,7 +78,7 @@ public static int FloorToInt(real_t s)
/// <summary>
/// Rounds <paramref name="s"/> to the nearest whole number.
///
/// This is the same as <see cref="Round(real_t)"/>, but returns an <c>int</c>.
/// This is the same as <see cref="Round(real_t)"/>, but returns an <see langword="int"/>.
/// </summary>
/// <param name="s">The number to round.</param>
/// <returns>The rounded number.</returns>
Expand Down
2 changes: 1 addition & 1 deletion modules/mono/glue/GodotSharp/GodotSharp/Core/NodePath.cs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ public NodePath() : this(string.Empty) { }
/// "/root/Level/Path2D"
/// </code>
/// </example>
/// <param name="path"></param>
/// <param name="path">A string that represents a path in a scene tree.</param>
public NodePath(string path)
{
ptr = godot_icall_NodePath_Ctor(path);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,10 @@ public static string Extension(this string instance)
/// <summary>
/// Find the first occurrence of a substring. Optionally, the search starting position can be passed.
/// </summary>
/// <seealso cref="Find(string, char, int, bool)"/>
/// <seealso cref="FindLast(string, string, bool)"/>
/// <seealso cref="FindLast(string, string, int, bool)"/>
/// <seealso cref="FindN(string, string, int)"/>
/// <param name="instance">The string that will be searched.</param>
/// <param name="what">The substring to find.</param>
/// <param name="from">The search starting position.</param>
Expand Down
2 changes: 1 addition & 1 deletion modules/mono/glue/GodotSharp/GodotSharp/Core/Transform.cs
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ public Transform Inverse()
/// Operations take place in global space.
/// </summary>
/// <param name="target">The object to look at.</param>
/// <param name="up">The relative up direction</param>
/// <param name="up">The relative up direction.</param>
/// <returns>The resulting transform.</returns>
public Transform LookingAt(Vector3 target, Vector3 up)
{
Expand Down
13 changes: 6 additions & 7 deletions modules/mono/glue/GodotSharp/GodotSharp/Core/Transform2D.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ public struct Transform2D : IEquatable<Transform2D>
/// <summary>
/// The basis matrix's X vector (column 0). Equivalent to array index <c>[0]</c>.
/// </summary>
/// <value></value>
public Vector2 x;

/// <summary>
Expand Down Expand Up @@ -420,12 +419,12 @@ public Transform2D(Vector2 xAxis, Vector2 yAxis, Vector2 originPos)
/// Constructs a transformation matrix from the given components.
/// Arguments are named such that xy is equal to calling x.y
/// </summary>
/// <param name="xx">The X component of the X column vector, accessed via <c>t.x.x</c> or <c>[0][0]</c></param>
/// <param name="xy">The Y component of the X column vector, accessed via <c>t.x.y</c> or <c>[0][1]</c></param>
/// <param name="yx">The X component of the Y column vector, accessed via <c>t.y.x</c> or <c>[1][0]</c></param>
/// <param name="yy">The Y component of the Y column vector, accessed via <c>t.y.y</c> or <c>[1][1]</c></param>
/// <param name="ox">The X component of the origin vector, accessed via <c>t.origin.x</c> or <c>[2][0]</c></param>
/// <param name="oy">The Y component of the origin vector, accessed via <c>t.origin.y</c> or <c>[2][1]</c></param>
/// <param name="xx">The X component of the X column vector, accessed via <c>t.x.x</c> or <c>[0][0]</c>.</param>
/// <param name="xy">The Y component of the X column vector, accessed via <c>t.x.y</c> or <c>[0][1]</c>.</param>
/// <param name="yx">The X component of the Y column vector, accessed via <c>t.y.x</c> or <c>[1][0]</c>.</param>
/// <param name="yy">The Y component of the Y column vector, accessed via <c>t.y.y</c> or <c>[1][1]</c>.</param>
/// <param name="ox">The X component of the origin vector, accessed via <c>t.origin.x</c> or <c>[2][0]</c>.</param>
/// <param name="oy">The Y component of the origin vector, accessed via <c>t.origin.y</c> or <c>[2][1]</c>.</param>
public Transform2D(real_t xx, real_t xy, real_t yx, real_t yy, real_t ox, real_t oy)
{
x = new Vector2(xx, xy);
Expand Down

0 comments on commit ffbd595

Please sign in to comment.