Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove obsolete methods #80

Merged
merged 1 commit into from
Nov 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
237 changes: 0 additions & 237 deletions nanoFramework.System.Math/Math.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,6 @@ public static int Max(int val1, int val2)
public static extern double Max(double x, double y);
#pragma warning restore S4200 // Native methods should be wrapped

/// <summary>
/// Returns the larger of two single-precision floating-point numbers.
/// </summary>
/// <param name="x">The first of two single-precision floating-point numbers to compare. </param>
/// <param name="y">The second of two single-precision floating-point numbers to compare. </param>
/// <returns>Parameter x or y, whichever is larger. If x, y, or both x and y are equal to NaN, NaN is returned.</returns>
[Obsolete("This method is obsolete. Call using type Double instead.", true)]
public static float Max(float x, float y)
{
return (float)Max((double)x, y);
}

/// <summary>
/// Returns the smaller of two 32-bit signed integers.
/// </summary>
Expand Down Expand Up @@ -131,17 +119,6 @@ public static int Abs(int val)
public static extern double Acos(double d);
#pragma warning restore S4200 // Native methods should be wrapped

/// <summary>
/// Returns the angle whose cosine is the specified number.
/// </summary>
/// <param name="d">A number representing a cosine, where d must be greater than or equal to -1, but less than or equal to 1. </param>
/// <returns>An angle, θ, measured in radians, such that 0 ≤ θ ≤ π -or- NaN if d &lt; -1 or d > 1 or d equals NaN.</returns>
[Obsolete("This method is obsolete. Call using type Double instead.", true)]
public static float Acos(float d)
{
return (float)Acos((double)d);
}

/// <summary>
/// Returns the angle whose sine is the specified number.
/// </summary>
Expand All @@ -152,17 +129,6 @@ public static float Acos(float d)
public static extern double Asin(double d);
#pragma warning restore S4200 // Native methods should be wrapped

/// <summary>
/// Returns the angle whose sine is the specified number.
/// </summary>
/// <param name="d">A number representing a sine, where d must be greater than or equal to -1, but less than or equal to 1.</param>
/// <returns>An angle, θ, measured in radians, such that -π/2 ≤ θ ≤ π/2 -or- NaN if d &lt; -1 or d> 1 or d equals NaN.</returns>
[Obsolete("This method is obsolete. Call using type Double instead.", true)]
public static float Asin(float d)
{
return (float)Asin((double)d);
}

/// <summary>
/// Returns the angle whose tangent is the specified number.
/// </summary>
Expand All @@ -173,17 +139,6 @@ public static float Asin(float d)
public static extern double Atan(double d);
#pragma warning restore S4200 // Native methods should be wrapped

/// <summary>
/// Returns the angle whose tangent is the specified number.
/// </summary>
/// <param name="d">A number representing a tangent. </param>
/// <returns>An angle, θ, measured in radians, such that -π/2 ≤ θ ≤ π/2. -or- NaN if d equals NaN, -π/2 rounded to double precision(-1.5707963267949) if d equals NegativeInfinity, or π/2 rounded to double precision(1.5707963267949) if d equals PositiveInfinity.</returns>
[Obsolete("This method is obsolete. Call using type Double instead.", true)]
public static float Atan(float d)
{
return (float)Atan((double)d);
}

/// <summary>
/// Returns the angle whose tangent is the quotient of two specified numbers.
/// </summary>
Expand All @@ -195,18 +150,6 @@ public static float Atan(float d)
public static extern double Atan2(double y, double x);
#pragma warning restore S4200 // Native methods should be wrapped

/// <summary>
/// Returns the angle whose tangent is the quotient of two specified numbers.
/// </summary>
/// <param name="y">The y coordinate of a point. </param>
/// <param name="x">The x coordinate of a point. </param>
/// <returns>An angle, θ, measured in radians, such that -π ≤ θ ≤ π, and tan(θ) = y / x, where (x, y) is a point in the Cartesian plane.</returns>
[Obsolete("This method is obsolete. Call using type Double instead.", true)]
public static float Atan2(float y, float x)
{
return (float)Atan2((double)y, x);
}

/// <summary>
/// Returns the smallest integral value that is greater than or equal to the specified double-precision floating-point number.
/// </summary>
Expand All @@ -217,17 +160,6 @@ public static float Atan2(float y, float x)
public static extern double Ceiling(double d);
#pragma warning restore S4200 // Native methods should be wrapped

/// <summary>
/// Returns the smallest integral value that is greater than or equal to the specified single-precision floating-point number.
/// </summary>
/// <param name="d">A single-precision floating-point number. </param>
/// <returns>The smallest integral value that is greater than or equal to d. If d is equal to NaN, NegativeInfinity, or PositiveInfinity, that value is returned. Note that this method returns a Double instead of an integral type.</returns>
[Obsolete("This method is obsolete. Call using type Double instead.", true)]
public static float Ceiling(float d)
{
return (float)Ceiling((double)d);
}

/// <summary>
/// Returns the cosine of the specified angle.
/// </summary>
Expand All @@ -238,17 +170,6 @@ public static float Ceiling(float d)
public static extern double Cos(double a);
#pragma warning restore S4200 // Native methods should be wrapped

/// <summary>
/// Returns the cosine of the specified angle.
/// </summary>
/// <param name="a">An angle, measured in radians. </param>
/// <returns>The cosine of a. If a is equal to NaN, NegativeInfinity, or PositiveInfinity, this method returns NaN.</returns>
[Obsolete("This method is obsolete. Call using type Double instead.", true)]
public static float Cos(float a)
{
return (float)Cos((double)a);
}

/// <summary>
/// Returns the hyperbolic cosine of the specified angle.
/// </summary>
Expand All @@ -259,17 +180,6 @@ public static float Cos(float a)
public static extern double Cosh(double a);
#pragma warning restore S4200 // Native methods should be wrapped

/// <summary>
/// Returns the hyperbolic cosine of the specified angle.
/// </summary>
/// <param name="a">An angle, measured in radians. </param>
/// <returns>The hyperbolic cosine of val. If val is equal to NegativeInfinity or PositiveInfinity, PositiveInfinity is returned. If value is equal to NaN, NaN is returned.</returns>
[Obsolete("This method is obsolete. Call using type Double instead.", true)]
public static float Cosh(float a)
{
return (float)Cosh((double)a);
}

/// <summary>
/// Returns the remainder resulting from the division of a specified number by another specified number.
/// </summary>
Expand All @@ -283,20 +193,6 @@ public static float Cosh(float a)
public static extern double IEEERemainder(double x, double y);
#pragma warning restore S4200 // Native methods should be wrapped

/// <summary>
/// Returns the remainder resulting from the division of a specified number by another specified number.
/// </summary>
/// <param name="x">A dividend. </param>
/// <param name="y">A divisor. </param>
/// <returns>A number equal to x - (y Q), where Q is the quotient of x / y rounded to the nearest integer (if x / y falls halfway between two integers, the even integer is returned).
/// If x - (y Q) is zero, the value +0 is returned if x is positive, or -0 if x is negative.
/// If y = 0, NaN is returned.</returns>
[Obsolete("This method is obsolete. Call using type Double instead.", true)]
public static float IEEERemainder(float x, float y)
{
return (float)IEEERemainder((double)x, y);
}

/// <summary>
/// Returns e raised to the specified power.
/// </summary>
Expand All @@ -307,17 +203,6 @@ public static float IEEERemainder(float x, float y)
public static extern double Exp(double d);
#pragma warning restore S4200 // Native methods should be wrapped

/// <summary>
/// Returns e raised to the specified power.
/// </summary>
/// <param name="d">A number specifying a power. </param>
/// <returns>The number e raised to the power d. If d equals NaN or PositiveInfinity, that value is returned. If d equals NegativeInfinity, 0 is returned.</returns>
[Obsolete("This method is obsolete. Call using type Double instead.", true)]
public static float Exp(float d)
{
return (float)Exp((double)d);
}

/// <summary>
/// Returns the largest integer less than or equal to the specified double-precision floating-point number.
/// </summary>
Expand All @@ -328,17 +213,6 @@ public static float Exp(float d)
public static extern double Floor(double d);
#pragma warning restore S4200 // Native methods should be wrapped

/// <summary>
/// Returns the largest integer less than or equal to the specified single-precision floating-point number.
/// </summary>
/// <param name="d">A single-precision floating-point number. </param>
/// <returns>The largest integer less than or equal to d. If d is equal to NaN, NegativeInfinity, or PositiveInfinity, that value is returned.</returns>
[Obsolete("This method is obsolete. Call using type Double instead.", true)]
public static float Floor(float d)
{
return (float)Floor((double)d);
}

/// <summary>
/// Returns the natural (base e) logarithm of a specified number.
/// </summary>
Expand All @@ -349,17 +223,6 @@ public static float Floor(float d)
public static extern double Log(double d);
#pragma warning restore S4200 // Native methods should be wrapped

/// <summary>
/// Returns the natural (base e) logarithm of a specified number.
/// </summary>
/// <param name="d">The number whose logarithm is to be found. </param>
/// <returns>The natural logarithm of d; that is, ln d, or log e d</returns>
[Obsolete("This method is obsolete. Call using type Double instead.", true)]
public static float Log(float d)
{
return (float)Log((double)d);
}

/// <summary>
/// Returns the base 10 logarithm of a specified number.
/// </summary>
Expand All @@ -370,17 +233,6 @@ public static float Log(float d)
public static extern double Log10(double d);
#pragma warning restore S4200 // Native methods should be wrapped

/// <summary>
/// Returns the base 10 logarithm of a specified number.
/// </summary>
/// <param name="d">A number whose logarithm is to be found. </param>
/// <returns>The base 10 log of d; that is, log 10 d.</returns>
[Obsolete("This method is obsolete. Call using type Double instead.", true)]
public static float Log10(float d)
{
return (float)Log10((double)d);
}

/// <summary>
/// Returns a specified number raised to the specified power.
/// </summary>
Expand All @@ -392,18 +244,6 @@ public static float Log10(float d)
public static extern double Pow(double x, double y);
#pragma warning restore S4200 // Native methods should be wrapped

/// <summary>
/// Returns a specified number raised to the specified power.
/// </summary>
/// <param name="x">A single-precision floating-point number to be raised to a power. </param>
/// <param name="y">A single-precision floating-point number that specifies a power. </param>
/// <returns>The number x raised to the power y.</returns>
[Obsolete("This method is obsolete. Call using type Double instead.", true)]
public static float Pow(float x, float y)
{
return (float)Pow((double)x, y);
}

/// <summary>
/// Rounds a double-precision floating-point value to the nearest integral value.
/// </summary>
Expand All @@ -414,17 +254,6 @@ public static float Pow(float x, float y)
public static extern double Round(double d);
#pragma warning restore S4200 // Native methods should be wrapped

/// <summary>
/// Rounds a single-precision floating-point value to the nearest integral value.
/// </summary>
/// <param name="d">A single-precision floating-point number to be rounded.</param>
/// <returns>The integer nearest d. If the fractional component of d is halfway between two integers, one of which is even and the other odd, then the even number is returned. Note that this method returns a Double instead of an integral type.</returns>
[Obsolete("This method is obsolete. Call using type Double instead.", true)]
public static float Round(float d)
{
return (float)Round((double)d);
}

/// <summary>
/// Returns a value indicating the sign of a double-precision floating-point number.
/// </summary>
Expand Down Expand Up @@ -455,17 +284,6 @@ public static int Sign(float value)
public static extern double Sin(double a);
#pragma warning restore S4200 // Native methods should be wrapped

/// <summary>
/// Returns the sine of the specified angle.
/// </summary>
/// <param name="a">An angle, measured in radians. </param>
/// <returns>The sine of a. If a is equal to NaN, NegativeInfinity, or PositiveInfinity, this method returns NaN.</returns>
[Obsolete("This method is obsolete. Call using type Double instead.", true)]
public static float Sin(float a)
{
return (float)Sin((double)a);
}

/// <summary>
/// Returns the hyperbolic sine of the specified angle.
/// </summary>
Expand All @@ -476,17 +294,6 @@ public static float Sin(float a)
public static extern double Sinh(double value);
#pragma warning restore S4200 // Native methods should be wrapped

/// <summary>
/// Returns the hyperbolic sine of the specified angle.
/// </summary>
/// <param name="value">An angle, measured in radians. </param>
/// <returns>The hyperbolic sine of value. If value is equal to NegativeInfinity, PositiveInfinity, or NaN, this method returns a Double equal to value.</returns>
[Obsolete("This method is obsolete. Call using type Double instead.", true)]
public static float Sinh(float value)
{
return (float)Sinh((double)value);
}

/// <summary>
/// Returns the square root of a specified number.
/// </summary>
Expand All @@ -497,17 +304,6 @@ public static float Sinh(float value)
public static extern double Sqrt(double d);
#pragma warning restore S4200 // Native methods should be wrapped

/// <summary>
/// Returns the square root of a specified number.
/// </summary>
/// <param name="d">The number whose square root is to be found. </param>
/// <returns>The positive square root of d.</returns>
[Obsolete("This method is obsolete. Call using type Double instead.", true)]
public static float Sqrt(float d)
{
return (float)Sqrt((double)d);
}

/// <summary>
/// Returns the tangent of the specified angle.
/// </summary>
Expand All @@ -518,17 +314,6 @@ public static float Sqrt(float d)
public static extern double Tan(double a);
#pragma warning restore S4200 // Native methods should be wrapped

/// <summary>
/// Returns the tangent of the specified angle.
/// </summary>
/// <param name="a">An angle, measured in radians. </param>
/// <returns>The tangent of a. If a is equal to NaN, NegativeInfinity, or PositiveInfinity, this method returns NaN.</returns>
[Obsolete("This method is obsolete. Call using type Double instead.", true)]
public static float Tan(float a)
{
return (float)Tan((double)a);
}

/// <summary>
/// Returns the hyperbolic tangent of the specified angle.
/// </summary>
Expand All @@ -539,17 +324,6 @@ public static float Tan(float a)
public static extern double Tanh(double value);
#pragma warning restore S4200 // Native methods should be wrapped

/// <summary>
/// Returns the hyperbolic tangent of the specified angle.
/// </summary>
/// <param name="value">An angle, measured in radians. </param>
/// <returns>The hyperbolic tangent of value. If value is equal to NegativeInfinity, this method returns -1. If value is equal to PositiveInfinity, this method returns 1. If value is equal to NaN, this method returns NaN.</returns>
[Obsolete("This method is obsolete. Call using type Double instead.", true)]
public static float Tanh(float value)
{
return (float)Tanh((double)value);
}

/// <summary>
/// Calculates the integral part of a specified double-precision floating-point number.
/// </summary>
Expand All @@ -559,16 +333,5 @@ public static float Tanh(float value)
#pragma warning disable S4200 // Native methods should be wrapped
public static extern double Truncate(double d);
#pragma warning restore S4200 // Native methods should be wrapped

/// <summary>
/// Calculates the integral part of a specified single-precision floating-point number.
/// </summary>
/// <param name="d">A number to truncate.</param>
/// <returns>The integral part of d; that is, the number that remains after any fractional digits have been discarded</returns>
[Obsolete("This method is obsolete. Call using type Double instead.", true)]
public static float Truncate(float d)
{
return (float)Truncate((double)d);
}
}
}
2 changes: 1 addition & 1 deletion nanoFramework.System.Math/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@

////////////////////////////////////////////////////////////////
// update this whenever the native assembly signature changes //
[assembly: AssemblyNativeVersion("100.0.5.2")]
[assembly: AssemblyNativeVersion("100.0.5.3")]
////////////////////////////////////////////////////////////////