Mth

object Mth

The Mth class provides some optimized mathematical calculation methods, and it is recommended to call these methods instead of those provided in the math library in kotlin/java.

This class uses a large amount of cache and trades space for time to optimize computing efficiency.

Author

KKoishi_

Functions

Link copied to clipboard

Generated optimized method for anti-trigonometric functions.

Link copied to clipboard

Generated optimized method for anti-trigonometric functions.

Link copied to clipboard

Generated optimized method for anti-trigonometric functions.

Link copied to clipboard
Link copied to clipboard

Generated optimized method for trigonometric functions.

Link copied to clipboard
fun gcd(a: Int, b: Int): Int
Link copied to clipboard

hypot(x,y) = sqrt(x * x + y * y)

Link copied to clipboard

Retains the previous certain number of digits in a double-precision floating-point number.

Retains the previous certain number of digits in a single-precision floating-point number.

Link copied to clipboard

Generated optimized method for trigonometric functions.

Link copied to clipboard
Link copied to clipboard

Generated optimized method for trigonometric functions.