CoreMath
CoreMath
Core mathematical functions for GridBuilding. Provides pure C# implementations of common math operations without dependencies on System.Math static class.
Project: GridPlacement v6.0
Layer: Godot
Source: Godot/Core/_incomplete/Systems/Geometry/CoreMath.cs
Namespace: GridBuilding.Core.Math
Kind: class
Parsing Method: AST-based (Roslyn) - NOT regex
⚠️ IMPORTANT: This documentation was generated using AST parsing, not regex.
Methods
Abs
Returns the absolute value of a number
Returns: int
Parameters:
int value
Abs
Returns the absolute value of a number
Returns: float
Parameters:
float value
Abs
Returns the absolute value of a number
Returns: double
Parameters:
double value
Sign
Returns the sign of a number (-1, 0, or 1)
Returns: int
Parameters:
int value
Sign
Returns the sign of a number (-1, 0, or 1)
Returns: int
Parameters:
float value
Sign
Returns the sign of a number (-1, 0, or 1)
Returns: int
Parameters:
double value
Min
Returns the smaller of two values
Returns: int
Parameters:
int aint b
Min
Returns the smaller of two values
Returns: float
Parameters:
float afloat b
Min
Returns the smaller of two values
Returns: double
Parameters:
double adouble b
Max
Returns the larger of two values
Returns: int
Parameters:
int aint b
Max
Returns the larger of two values
Returns: float
Parameters:
float afloat b
Max
Returns the larger of two values
Returns: double
Parameters:
double adouble b
Clamp
Clamps a value between a minimum and maximum
Returns: int
Parameters:
int valueint minint max
Clamp
Clamps a value between a minimum and maximum
Returns: float
Parameters:
float valuefloat minfloat max
Clamp
Clamps a value between a minimum and maximum
Returns: double
Parameters:
double valuedouble mindouble max
Round
Rounds a value to the nearest integer
Returns: int
Parameters:
float value
Round
Rounds a value to the nearest integer
Returns: int
Parameters:
double value
Floor
Returns the largest integer less than or equal to the specified value
Returns: int
Parameters:
float value
Floor
Returns the largest integer less than or equal to the specified value
Returns: int
Parameters:
double value
Ceiling
Returns the smallest integer greater than or equal to the specified value
Returns: int
Parameters:
float value
Ceiling
Returns the smallest integer greater than or equal to the specified value
Returns: int
Parameters:
double value
Pow
Returns a specified number raised to the specified power
Returns: double
Parameters:
double xdouble y
Sqrt
Returns the square root of a specified number
Returns: double
Parameters:
double value
Cos
Returns the cosine of the specified angle
Returns: double
Parameters:
double angle
Sin
Returns the sine of the specified angle
Returns: double
Parameters:
double angle
Tan
Returns the tangent of the specified angle
Returns: double
Parameters:
double angle
Acos
Returns the angle whose cosine is the specified number
Returns: double
Parameters:
double value
Asin
Returns the angle whose sine is the specified number
Returns: double
Parameters:
double value
Atan
Returns the angle whose tangent is the specified number
Returns: double
Parameters:
double value
Atan2
Returns the angle whose tangent is the quotient of two specified numbers
Returns: double
Parameters:
double ydouble x
Approximately
Determines if two floating point values are approximately equal within epsilon
Returns: bool
Parameters:
float afloat b
Approximately
Determines if two floating point values are approximately equal within epsilon
Returns: bool
Parameters:
double adouble b