Rename Vector parameters to be consistent

Renames parameters that were named differently across different
scripting languages or their documentation to use the same name
everywhere.
This commit is contained in:
Raul Santos 2021-11-29 18:02:42 +01:00
parent b9d877e55f
commit a367378f9e
9 changed files with 95 additions and 95 deletions

View file

@ -184,13 +184,13 @@ namespace Godot
}
/// <summary>
/// Returns the cross product of this vector and <paramref name="b"/>.
/// Returns the cross product of this vector and <paramref name="with"/>.
/// </summary>
/// <param name="b">The other vector.</param>
/// <param name="with">The other vector.</param>
/// <returns>The cross product value.</returns>
public real_t Cross(Vector2 b)
public real_t Cross(Vector2 with)
{
return (x * b.y) - (y * b.x);
return (x * with.y) - (y * with.x);
}
/// <summary>
@ -222,13 +222,13 @@ namespace Godot
}
/// <summary>
/// Returns the normalized vector pointing from this vector to <paramref name="b"/>.
/// Returns the normalized vector pointing from this vector to <paramref name="to"/>.
/// </summary>
/// <param name="b">The other vector to point towards.</param>
/// <returns>The direction from this vector to <paramref name="b"/>.</returns>
public Vector2 DirectionTo(Vector2 b)
/// <param name="to">The other vector to point towards.</param>
/// <returns>The direction from this vector to <paramref name="to"/>.</returns>
public Vector2 DirectionTo(Vector2 to)
{
return new Vector2(b.x - x, b.y - y).Normalized();
return new Vector2(to.x - x, to.y - y).Normalized();
}
/// <summary>

View file

@ -149,45 +149,45 @@ namespace Godot
}
/// <summary>
/// Returns the cross product of this vector and <paramref name="b"/>.
/// Returns the cross product of this vector and <paramref name="with"/>.
/// </summary>
/// <param name="b">The other vector.</param>
/// <param name="with">The other vector.</param>
/// <returns>The cross product vector.</returns>
public int Cross(Vector2i b)
public int Cross(Vector2i with)
{
return x * b.y - y * b.x;
return x * with.y - y * with.x;
}
/// <summary>
/// Returns the squared distance between this vector and <paramref name="b"/>.
/// Returns the squared distance between this vector and <paramref name="to"/>.
/// This method runs faster than <see cref="DistanceTo"/>, so prefer it if
/// you need to compare vectors or need the squared distance for some formula.
/// </summary>
/// <param name="b">The other vector to use.</param>
/// <param name="to">The other vector to use.</param>
/// <returns>The squared distance between the two vectors.</returns>
public int DistanceSquaredTo(Vector2i b)
public int DistanceSquaredTo(Vector2i to)
{
return (b - this).LengthSquared();
return (to - this).LengthSquared();
}
/// <summary>
/// Returns the distance between this vector and <paramref name="b"/>.
/// Returns the distance between this vector and <paramref name="to"/>.
/// </summary>
/// <param name="b">The other vector to use.</param>
/// <param name="to">The other vector to use.</param>
/// <returns>The distance between the two vectors.</returns>
public real_t DistanceTo(Vector2i b)
public real_t DistanceTo(Vector2i to)
{
return (b - this).Length();
return (to - this).Length();
}
/// <summary>
/// Returns the dot product of this vector and <paramref name="b"/>.
/// Returns the dot product of this vector and <paramref name="with"/>.
/// </summary>
/// <param name="b">The other vector to use.</param>
/// <param name="with">The other vector to use.</param>
/// <returns>The dot product of the two vectors.</returns>
public int Dot(Vector2i b)
public int Dot(Vector2i with)
{
return x * b.x + y * b.y;
return x * with.x + y * with.y;
}
/// <summary>

View file

@ -170,17 +170,17 @@ namespace Godot
}
/// <summary>
/// Returns the cross product of this vector and <paramref name="b"/>.
/// Returns the cross product of this vector and <paramref name="with"/>.
/// </summary>
/// <param name="b">The other vector.</param>
/// <param name="with">The other vector.</param>
/// <returns>The cross product vector.</returns>
public Vector3 Cross(Vector3 b)
public Vector3 Cross(Vector3 with)
{
return new Vector3
(
(y * b.z) - (z * b.y),
(z * b.x) - (x * b.z),
(x * b.y) - (y * b.x)
(y * with.z) - (z * with.y),
(z * with.x) - (x * with.z),
(x * with.y) - (y * with.x)
);
}
@ -212,46 +212,46 @@ namespace Godot
}
/// <summary>
/// Returns the normalized vector pointing from this vector to <paramref name="b"/>.
/// Returns the normalized vector pointing from this vector to <paramref name="to"/>.
/// </summary>
/// <param name="b">The other vector to point towards.</param>
/// <returns>The direction from this vector to <paramref name="b"/>.</returns>
public Vector3 DirectionTo(Vector3 b)
/// <param name="to">The other vector to point towards.</param>
/// <returns>The direction from this vector to <paramref name="to"/>.</returns>
public Vector3 DirectionTo(Vector3 to)
{
return new Vector3(b.x - x, b.y - y, b.z - z).Normalized();
return new Vector3(to.x - x, to.y - y, to.z - z).Normalized();
}
/// <summary>
/// Returns the squared distance between this vector and <paramref name="b"/>.
/// Returns the squared distance between this vector and <paramref name="to"/>.
/// This method runs faster than <see cref="DistanceTo"/>, so prefer it if
/// you need to compare vectors or need the squared distance for some formula.
/// </summary>
/// <param name="b">The other vector to use.</param>
/// <param name="to">The other vector to use.</param>
/// <returns>The squared distance between the two vectors.</returns>
public real_t DistanceSquaredTo(Vector3 b)
public real_t DistanceSquaredTo(Vector3 to)
{
return (b - this).LengthSquared();
return (to - this).LengthSquared();
}
/// <summary>
/// Returns the distance between this vector and <paramref name="b"/>.
/// Returns the distance between this vector and <paramref name="to"/>.
/// </summary>
/// <seealso cref="DistanceSquaredTo(Vector3)"/>
/// <param name="b">The other vector to use.</param>
/// <param name="to">The other vector to use.</param>
/// <returns>The distance between the two vectors.</returns>
public real_t DistanceTo(Vector3 b)
public real_t DistanceTo(Vector3 to)
{
return (b - this).Length();
return (to - this).Length();
}
/// <summary>
/// Returns the dot product of this vector and <paramref name="b"/>.
/// Returns the dot product of this vector and <paramref name="with"/>.
/// </summary>
/// <param name="b">The other vector to use.</param>
/// <param name="with">The other vector to use.</param>
/// <returns>The dot product of the two vectors.</returns>
public real_t Dot(Vector3 b)
public real_t Dot(Vector3 with)
{
return (x * b.x) + (y * b.y) + (z * b.z);
return (x * with.x) + (y * with.y) + (z * with.z);
}
/// <summary>
@ -412,16 +412,16 @@ namespace Godot
}
/// <summary>
/// Returns the outer product with <paramref name="b"/>.
/// Returns the outer product with <paramref name="with"/>.
/// </summary>
/// <param name="b">The other vector.</param>
/// <param name="with">The other vector.</param>
/// <returns>A <see cref="Basis"/> representing the outer product matrix.</returns>
public Basis Outer(Vector3 b)
public Basis Outer(Vector3 with)
{
return new Basis(
x * b.x, x * b.y, x * b.z,
y * b.x, y * b.y, y * b.z,
z * b.x, z * b.y, z * b.z
x * with.x, x * with.y, x * with.z,
y * with.x, y * with.y, y * with.z,
z * with.x, z * with.y, z * with.z
);
}

View file

@ -124,36 +124,36 @@ namespace Godot
}
/// <summary>
/// Returns the squared distance between this vector and <paramref name="b"/>.
/// Returns the squared distance between this vector and <paramref name="to"/>.
/// This method runs faster than <see cref="DistanceTo"/>, so prefer it if
/// you need to compare vectors or need the squared distance for some formula.
/// </summary>
/// <param name="b">The other vector to use.</param>
/// <param name="to">The other vector to use.</param>
/// <returns>The squared distance between the two vectors.</returns>
public int DistanceSquaredTo(Vector3i b)
public int DistanceSquaredTo(Vector3i to)
{
return (b - this).LengthSquared();
return (to - this).LengthSquared();
}
/// <summary>
/// Returns the distance between this vector and <paramref name="b"/>.
/// Returns the distance between this vector and <paramref name="to"/>.
/// </summary>
/// <seealso cref="DistanceSquaredTo(Vector3i)"/>
/// <param name="b">The other vector to use.</param>
/// <param name="to">The other vector to use.</param>
/// <returns>The distance between the two vectors.</returns>
public real_t DistanceTo(Vector3i b)
public real_t DistanceTo(Vector3i to)
{
return (b - this).Length();
return (to - this).Length();
}
/// <summary>
/// Returns the dot product of this vector and <paramref name="b"/>.
/// Returns the dot product of this vector and <paramref name="with"/>.
/// </summary>
/// <param name="b">The other vector to use.</param>
/// <param name="with">The other vector to use.</param>
/// <returns>The dot product of the two vectors.</returns>
public int Dot(Vector3i b)
public int Dot(Vector3i with)
{
return x * b.x + y * b.y + z * b.z;
return x * with.x + y * with.y + z * with.z;
}
/// <summary>