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
Use new BCL APIs from .NET 7/8 #6203
Conversation
public static bool IsAsciiDigit(this char character) => character >= '0' && character <= '9'; | ||
[Obsolete("Use char.IsAsciiDigit.")] // can be removed 20240901 | ||
public static bool IsAsciiDigit(this char character) => char.IsAsciiDigit(character); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CoreLib version is slightly faster for this.
return degrees * MathF.PI / 180.0f; | ||
} | ||
[Obsolete("Use float.DegressToRadians.")] // can be removed 20240901 | ||
public static float DegreesToRadians(float degrees) => float.DegreesToRadians(degrees); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Putting these in float
/double
is a very interesting API decision to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's a whole shebang. personally abstractions over numbers have been loooooooooooong overdue so i'm in hook line and sinker
The BCL versions are generally safer and faster.