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 a
  • int b

Min

Returns the smaller of two values

Returns: float

Parameters:

  • float a
  • float b

Min

Returns the smaller of two values

Returns: double

Parameters:

  • double a
  • double b

Max

Returns the larger of two values

Returns: int

Parameters:

  • int a
  • int b

Max

Returns the larger of two values

Returns: float

Parameters:

  • float a
  • float b

Max

Returns the larger of two values

Returns: double

Parameters:

  • double a
  • double b

Clamp

Clamps a value between a minimum and maximum

Returns: int

Parameters:

  • int value
  • int min
  • int max

Clamp

Clamps a value between a minimum and maximum

Returns: float

Parameters:

  • float value
  • float min
  • float max

Clamp

Clamps a value between a minimum and maximum

Returns: double

Parameters:

  • double value
  • double min
  • double 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 x
  • double 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 y
  • double x

Approximately

Determines if two floating point values are approximately equal within epsilon

Returns: bool

Parameters:

  • float a
  • float b

Approximately

Determines if two floating point values are approximately equal within epsilon

Returns: bool

Parameters:

  • double a
  • double b