Rename param "angle" to "value"

This commit is contained in:
Oliver Booth 2021-03-11 16:19:49 +00:00
parent 3499457667
commit ae9306cf93
2 changed files with 16 additions and 28 deletions

View File

@ -11,14 +11,11 @@ namespace X10D.DoubleExtensions
/// <summary>
/// Converts the current angle in degrees to its equivalent represented in radians.
/// </summary>
/// <param name="angle">The angle in degrees to convert.</param>
/// <returns>
/// <paramref name="angle" /> converted from degrees to radians by calculating
/// <c><paramref name="angle" />π / 180</c>.
/// </returns>
public static double DegreesToRadians(this double angle)
/// <param name="value">The angle in degrees to convert.</param>
/// <returns>The result of π * <paramref name="value" /> / 180.</returns>
public static double DegreesToRadians(this double value)
{
return Math.PI * angle / 180.0;
return Math.PI * value / 180.0;
}
/// <summary>
@ -105,14 +102,11 @@ namespace X10D.DoubleExtensions
/// <summary>
/// Converts the current angle in radians to its equivalent represented in degrees.
/// </summary>
/// <param name="angle">The angle in radians to convert.</param>
/// <returns>
/// <paramref name="angle" /> converted from radians to degrees by calculating
/// <c><paramref name="angle" />(180 / π)</c>.
/// </returns>
public static double RadiansToDegrees(this double angle)
/// <param name="value">The angle in radians to convert.</param>
/// <returns>The result of π * <paramref name="value" /> / 180.</returns>
public static double RadiansToDegrees(this double value)
{
return angle * (180.0 / Math.PI);
return value * (180.0 / Math.PI);
}
/// <summary>

View File

@ -11,14 +11,11 @@ namespace X10D.SingleExtensions
/// <summary>
/// Converts the current angle in degrees to its equivalent represented in radians.
/// </summary>
/// <param name="angle">The angle in degrees to convert.</param>
/// <returns>
/// <paramref name="angle" /> converted from degrees to radians by calculating
/// <c><paramref name="angle" />π / 180</c>.
/// </returns>
public static float DegreesToRadians(this float angle)
/// <param name="value">The angle in degrees to convert.</param>
/// <returns>The result of π * <paramref name="value" /> / 180.</returns>
public static float DegreesToRadians(this float value)
{
return (float)((double)angle).DegreesToRadians();
return (float)((double)value).DegreesToRadians();
}
/// <summary>
@ -105,14 +102,11 @@ namespace X10D.SingleExtensions
/// <summary>
/// Converts the current angle in radians to its equivalent represented in degrees.
/// </summary>
/// <param name="angle">The angle in radians to convert.</param>
/// <returns>
/// <paramref name="angle" /> converted from radians to degrees by calculating
/// <c><paramref name="angle" />(180 / π)</c>.
/// </returns>
public static float RadiansToDegrees(this float angle)
/// <param name="value">The angle in radians to convert.</param>
/// <returns>The result of π * <paramref name="value" /> / 180.</returns>
public static float RadiansToDegrees(this float value)
{
return (float)((double)angle).RadiansToDegrees();
return (float)((double)value).RadiansToDegrees();
}
/// <summary>