Table of Contents

Class Math

Namespace
Sdl3Sharp.Utilities
Assembly
Sdl3Sharp.dll

Provides mathematical constants and methods for various mathematical operations

public static class Math
Inheritance
Math
Inherited Members

Fields

EpsilonF

An epsilon constant, used for comparing float values

public const float EpsilonF = 1.1920929E-07

Field Value

float

Pi

The value of the mathematical constant π as a double constant

public const double Pi = 3.141592653589793

Field Value

double

PiF

The value of the mathematical constant π as a float constant

public const float PiF = 3.1415927

Field Value

float

Methods

Abs(double)

Computes the absolute value of a specified real value

public static double Abs(double x)

Parameters

x double

The real value whose absolute value should be calculated

Returns

double

The absolute value of x. The return value is in the range [0, ∞].

Abs(int)

Computes the absolute value of a specified integer value

public static int Abs(int x)

Parameters

x int

The integer value whose absolute value should be calculated

Returns

int

The absolute value of x

Abs(float)

Computes the absolute value of a specified real value

public static float Abs(float x)

Parameters

x float

The real value whose absolute value should be calculated

Returns

float

The absolute value of x. The return value is in the range [0, ∞].

Acos(double)

Computes the arc cosine of a specified real value

public static double Acos(double x)

Parameters

x double

The real value whose arc cosine should be calculated. Should be in the range [-1, 1].

Returns

double

The arc cosine of x, in radians. The return value is in the range [0, π].

Remarks

This method may use a different approximation across different versions, platforms and configurations. It could return a different value given the same input on different machines or operating systems, or if SDL is updated.

Acos(float)

Computes the arc cosine of a specified real value

public static float Acos(float x)

Parameters

x float

The real value whose arc cosine should be calculated. Should be in the range [-1, 1].

Returns

float

The arc cosine of x, in radians. The return value is in the range [0, π].

Remarks

This method may use a different approximation across different versions, platforms and configurations. It could return a different value given the same input on different machines or operating systems, or if SDL is updated.

Asin(double)

Computes the arc sine of a specified real value

public static double Asin(double x)

Parameters

x double

The real value whose arc sine should be calculated. Should be in the range [-1, 1].

Returns

double

The arc sine of x, in radians. The return value is in the range [-½π, ½π].

Remarks

This method may use a different approximation across different versions, platforms and configurations. It could return a different value given the same input on different machines or operating systems, or if SDL is updated.

Asin(float)

Computes the arc sine of a specified real value

public static float Asin(float x)

Parameters

x float

The real value whose arc sine should be calculated. Should be in the range [-1, 1].

Returns

float

The arc sine of x, in radians. The return value is in the range [-½π, ½π].

Remarks

This method may use a different approximation across different versions, platforms and configurations. It could return a different value given the same input on different machines or operating systems, or if SDL is updated.

Atan(double)

Computes the arc tangent of a specified real value

public static double Atan(double x)

Parameters

x double

The real value whose arc tangent should be calculated

Returns

double

The arc tangent of x, in radians, or 0 if x is 0. The return value is in the range [-½π, ½π].

Remarks

To calculate the arc tangent of a quotient of two real values, use Atan2(double, double) instead.

This method may use a different approximation across different versions, platforms and configurations. It could return a different value given the same input on different machines or operating systems, or if SDL is updated.

Atan(float)

Computes the arc tangent of a specified real value

public static float Atan(float x)

Parameters

x float

The real value whose arc tangent should be calculated

Returns

float

The arc tangent of x, in radians, or 0 if x is 0. The return value is in the range [-½π, ½π].

Remarks

To calculate the arc tangent of a quotient of two real values, use Atan2(float, float) instead.

This method may use a different approximation across different versions, platforms and configurations. It could return a different value given the same input on different machines or operating systems, or if SDL is updated.

Atan2(double, double)

Compute the arc tangent of a quotient of two specified real values, using their signs to adjust the result's quadrant

public static double Atan2(double y, double x)

Parameters

y double

The real value of the numerator of the quotient (y coordinate) whose arc tangent should be calculated

x double

The real value of the denominator of the quotient (x coordinate) whose arc tangent should be calculated

Returns

double

The arc tangent of y / x, in radians, or if x is 0, either -½π, 0, ½π, depending on the value of y. The return value is in the range [-π, π].

Remarks

To calculate the arc tangent of a single real value, use Atan(double) instead.

This method may use a different approximation across different versions, platforms and configurations. It could return a different value given the same input on different machines or operating systems, or if SDL is updated.

Atan2(float, float)

Compute the arc tangent of a quotient of two specified real values, using their signs to adjust the result's quadrant

public static float Atan2(float y, float x)

Parameters

y float

The real value of the numerator of the quotient (y coordinate) whose arc tangent should be calculated

x float

The real value of the denominator of the quotient (x coordinate) whose arc tangent should be calculated

Returns

float

The arc tangent of y / x, in radians, or if x is 0, either -½π, 0, ½π, depending on the value of y. The return value is in the range [-π, π].

Remarks

To calculate the arc tangent of a single real value, use Atan(float) instead.

This method may use a different approximation across different versions, platforms and configurations. It could return a different value given the same input on different machines or operating systems, or if SDL is updated.

Ceil(double)

Computes the ceiling of a specified real value

public static double Ceil(double x)

Parameters

x double

The real value whose ceiling should be calculated

Returns

double

The ceiling of x, which is the smallest integer y such that y ≥ x

Ceil(float)

Computes the ceiling of a specified real value

public static float Ceil(float x)

Parameters

x float

The real value whose ceiling should be calculated

Returns

float

The ceiling of x, which is the smallest integer y such that y ≥ x

Clamp<T>(T, T, T, IDispatchComparable<T>?)

Clamps a specified value to a specified range

public static T Clamp<T>(T value, T min, T max, Math.IDispatchComparable<T>? _ = null) where T : IComparable<T>

Parameters

value T

The value which should be clamped to the specified range

min T

The lower end value of the range to which the value should be clamped

max T

The upper end value of the range to which the value should be clamped

_ Math.IDispatchComparable<T>

Please ignore and do not explicitly set this parameter

Returns

T

min or max as appropriate, if value is outside the range [min, max]; otherwise value

Type Parameters

T

The type of value to clamp

Remarks

This method will produce incorrect results if max is less than min. Note: There are no additional checks in place to prevent that kind of behavior.

This method works for types of value T which implement IComparable<T>. If T implements both IComparable<T> and IComparisonOperators<TSelf, TOther, TResult>, overload resolution prioritizes Clamp<T>(T, T, T, IDispatchComparisonOperators<T>?) instead.

Please ignore and do not explicitly set the _ parameter. This parameter is just used in the method's signature to dispatch calls to this method for types of value T which implement IComparable<T>.

Clamp<T>(T, T, T, IDispatchComparisonOperators<T>?)

Clamps a specified value to a specified range

public static T Clamp<T>(T value, T min, T max, Math.IDispatchComparisonOperators<T>? _ = null) where T : IComparisonOperators<T, T, bool>

Parameters

value T

The value which should be clamped to the specified range

min T

The lower end value of the range to which the value should be clamped

max T

The upper end value of the range to which the value should be clamped

_ Math.IDispatchComparisonOperators<T>

Please ignore and do not explicitly set this parameter

Returns

T

min or max as appropriate, if value is outside the range [min, max]; otherwise value

Type Parameters

T

The type of value to clamp

Remarks

This method will produce incorrect results if max is less than min. Note: There are no additional checks in place to prevent that kind of behavior.

This method works for types of value T which implement IComparisonOperators<TSelf, TOther, TResult>. If T implements both IComparisonOperators<TSelf, TOther, TResult> and IComparable<T>, overload resolution prioritizes this method.

Please ignore and do not explicitly set the _ parameter. This parameter is just used in the method's signature to dispatch calls to this method for types of value T which implement IComparisonOperators<TSelf, TOther, TResult>.

CopySign(double, double)

Copies the sign of a real value to another

public static double CopySign(double x, double y)

Parameters

x double

The real value to use as the results magnitude

y double

The real value to use as the results sign

Returns

double

A real value with the sign of y and the magnitude of x

Remarks

This method essentially returns abs(x) ⋅ sgn(y).

  • If you want to compute the magnitude of a real number x (a.k.a absolute value or abs), you can use CopySign(x, 1). You also could use Abs(double) instead.
  • If you want to get the sign of a real number x (a.k.a sgn), you can use CopySign(1, x)

CopySign(float, float)

Copies the sign of a real value to another

public static float CopySign(float x, float y)

Parameters

x float

The real value to use as the results magnitude

y float

The real value to use as the results sign

Returns

float

A real value with the sign of y and the magnitude of x

Remarks

This method essentially returns abs(x) ⋅ sgn(y).

  • If you want to compute the magnitude of a real number x (a.k.a absolute value or abs), you can use CopySign(x, 1) /// You also could use Abs(float) instead.
  • If you want to get the sign of a real number x (a.k.a sgn), you can use CopySign(1, x)

Cos(double)

Computes the cosine of a specified real value

public static double Cos(double x)

Parameters

x double

The real value, in radians, whose cosine should be calculated

Returns

double

The cosine of x. The return value is in the range [-1, 1].

Remarks

This method may use a different approximation across different versions, platforms and configurations. It could return a different value given the same input on different machines or operating systems, or if SDL is updated.

Cos(float)

Computes the cosine of a specified real value

public static float Cos(float x)

Parameters

x float

The real value, in radians, whose cosine should be calculated

Returns

float

The cosine of x. The return value is in the range [-1, 1].

Remarks

This method may use a different approximation across different versions, platforms and configurations. It could return a different value given the same input on different machines or operating systems, or if SDL is updated.

Exp(double)

Computes the exponential of a specified real value

public static double Exp(double x)

Parameters

x double

The real value whose exponential should be calculated

Returns

double

The value of e raised to the power of x, where e is Euler's number. The return value is in the range [0, ∞].

Remarks

Note: The result will overflow if e raised to power of x is too large to be represented as a double.

This method may use a different approximation across different versions, platforms and configurations. It could return a different value given the same input on different machines or operating systems, or if SDL is updated.

Exp(float)

Computes the exponential of a specified real value

public static float Exp(float x)

Parameters

x float

The real value whose exponential should be calculated

Returns

float

The value of e raised to the power of x, where e is Euler's number. The return value is in the range [0, ∞].

Remarks

Note: The result will overflow if e raised to power of x is too large to be represented as a float.

This method may use a different approximation across different versions, platforms and configurations. It could return a different value given the same input on different machines or operating systems, or if SDL is updated.

Floor(double)

Computes the floor of a specified real value

public static double Floor(double x)

Parameters

x double

The real value whose floor should be calculated

Returns

double

The floor of x, which is the largest integer y such that y ≤ x

Floor(float)

Computes the floor of a specified real value

public static float Floor(float x)

Parameters

x float

The real value whose floor should be calculated

Returns

float

The floor of x, which is the largest integer y such that y ≤ x

IsInfinity(double)

Determines whether a floating point value represents infinity

public static bool IsInfinity(double x)

Parameters

x double

The floating point value which should be checked if it represents infinity

Returns

bool

true if x represents infinity; otherwise false

IsInfinity(float)

Determines whether a floating point value represents infinity

public static bool IsInfinity(float x)

Parameters

x float

The floating point value which should be checked if it represents infinity

Returns

bool

true if x represents infinity; otherwise false

IsNaN(double)

Determines whether a floating point value represents not a number (NaN)

public static bool IsNaN(double x)

Parameters

x double

The floating point value which should be checked if it represents not a number (NaN)

Returns

bool

true if x represents not a number (NaN); otherwise false

IsNaN(float)

Determines whether a floating point value represents not a number (NaN)

public static bool IsNaN(float x)

Parameters

x float

The floating point value which should be checked if it represents not a number (NaN)

Returns

bool

true if x represents not a number (NaN); otherwise false

Log(double)

Computes the natural logarithm of a specified real value

public static double Log(double x)

Parameters

x double

The real value whose natural logarithm should be calculated. Must be greater than 0.

Returns

double

The natural logarithm of x

Remarks

Note: There are no additional checks in place to prevent x from being less than or equal to 0. Using such values as arguments for x for Log(double) is an error! You must make sure on your own that x is greater than 0.

This method may use a different approximation across different versions, platforms and configurations. It could return a different value given the same input on different machines or operating systems, or if SDL is updated.

Log(float)

Computes the natural logarithm of a specified real value

public static float Log(float x)

Parameters

x float

The real value whose natural logarithm should be calculated. Must be greater than 0.

Returns

float

The natural logarithm of x

Remarks

Note: There are no additional checks in place to prevent x from being less than or equal to 0. Using such values as arguments for x for Log(float) is an error! You must make sure on your own that x is greater than 0.

This method may use a different approximation across different versions, platforms and configurations. It could return a different value given the same input on different machines or operating systems, or if SDL is updated.

Log10(double)

Computes the logarithm of a specified real value to base 10

public static double Log10(double x)

Parameters

x double

The real value whose logarithm to base 10 should be calculated. Must be greater than 0.

Returns

double

The logarithm of x to base 10

Remarks

Note: There are no additional checks in place to prevent x from being less than or equal to 0. Using such values as arguments for x for Log(double) is an error! You must make sure on your own that x is greater than 0.

This method may use a different approximation across different versions, platforms and configurations. It could return a different value given the same input on different machines or operating systems, or if SDL is updated.

Log10(float)

Computes the logarithm of a specified real value to base 10

public static float Log10(float x)

Parameters

x float

The real value whose logarithm to base 10 should be calculated. Must be greater than 0.

Returns

float

The logarithm of x to base 10

Remarks

Note: There are no additional checks in place to prevent x from being less than or equal to 0. Using such values as arguments for x for Log(double) is an error! You must make sure on your own that x is greater than 0.

This method may use a different approximation across different versions, platforms and configurations. It could return a different value given the same input on different machines or operating systems, or if SDL is updated.

Max<T>(T, T, IDispatchComparable<T>?)

Returns the greater value of two specified values

public static T Max<T>(T x, T y, Math.IDispatchComparable<T>? _ = null) where T : IComparable<T>

Parameters

x T

The first value to compare

y T

The second value to compare

_ Math.IDispatchComparable<T>

Please ignore and do not explicitly set this parameter

Returns

T

The greater value of x and y

Type Parameters

T

The type of value

Remarks

This method works for types of x and y T which implement IComparable<T>. If T implements both IComparable<T> and IComparisonOperators<TSelf, TOther, TResult>, overload resolution prioritizes Max<T>(T, T, IDispatchComparisonOperators<T>?) instead.

Please ignore and do not explicitly set the _ parameter. This parameter is just used in the method's signature to dispatch calls to this method for types of x and y T which implement IComparable<T>.

Max<T>(T, T, IDispatchComparisonOperators<T>?)

Returns the greater value of two specified values

public static T Max<T>(T x, T y, Math.IDispatchComparisonOperators<T>? _ = null) where T : IComparisonOperators<T, T, bool>

Parameters

x T

The first value to compare

y T

The second value to compare

_ Math.IDispatchComparisonOperators<T>

Please ignore and do not explicitly set this parameter

Returns

T

The greater value of x and y

Type Parameters

T

The type of value

Remarks

This method works for types of x and y T which implement IComparisonOperators<TSelf, TOther, TResult>. If T implements both IComparable<T> and IComparisonOperators<TSelf, TOther, TResult>, overload resolution prioritizes this method.

Please ignore and do not explicitly set the _ parameter. This parameter is just used in the method's signature to dispatch calls to this method for types of x and y T which implement IComparisonOperators<TSelf, TOther, TResult>.

Min<T>(T, T, IDispatchComparable<T>?)

Returns the lesser value of two specified values

public static T Min<T>(T x, T y, Math.IDispatchComparable<T>? _ = null) where T : IComparable<T>

Parameters

x T

The first value to compare

y T

The second value to compare

_ Math.IDispatchComparable<T>

Please ignore and do not explicitly set this parameter

Returns

T

The lesser value of x and y

Type Parameters

T

The type of value

Remarks

This method works for types of x and y T which implement IComparable<T>. If T implements both IComparable<T> and IComparisonOperators<TSelf, TOther, TResult>, overload resolution prioritizes Max<T>(T, T, IDispatchComparisonOperators<T>?) instead.

Please ignore and do not explicitly set the _ parameter. This parameter is just used in the method's signature to dispatch calls to this method for types of x and y T which implement IComparable<T>.

Min<T>(T, T, IDispatchComparisonOperators<T>?)

Returns the lesser value of two specified values

public static T Min<T>(T x, T y, Math.IDispatchComparisonOperators<T>? _ = null) where T : IComparisonOperators<T, T, bool>

Parameters

x T

The first value to compare

y T

The second value to compare

_ Math.IDispatchComparisonOperators<T>

Please ignore and do not explicitly set this parameter

Returns

T

The lesser value of x and y

Type Parameters

T

The type of value

Remarks

This method works for types of x and y T which implement IComparisonOperators<TSelf, TOther, TResult>. If T implements both IComparable<T> and IComparisonOperators<TSelf, TOther, TResult>, overload resolution prioritizes this method.

Please ignore and do not explicitly set the _ parameter. This parameter is just used in the method's signature to dispatch calls to this method for types of x and y T which implement IComparisonOperators<TSelf, TOther, TResult>.

Mod(double)

Splits a specified real value into its integer and fractional parts

public static (double Integer, double Fractional) Mod(double x)

Parameters

x double

The real value which should be split into its integer and fractional part

Returns

(double Integer, double Fractional)

The integer and fractional part of x

Mod(double, double)

Computes the remainder of the division of two specified real values

public static double Mod(double x, double y)

Parameters

x double

The real value of the numerator of the division whose remainder should be calculated

y double

The real value of the denominator of the division whose remainder should be calculated. Must not be 0.

Returns

double

The remainder of the division of x by y. The return value is in the range [-y, y].

Remarks

Note: There are no additional checks in place to prevent y from being 0. You must make sure on your own that y is not 0.

Mod(double, out double)

Splits a specified real value into its integer and fractional parts

public static double Mod(double x, out double integerPart)

Parameters

x double

The real value which should be split into its integer and fractional parts

integerPart double

The integer part of x

Returns

double

The fractional part of x

Mod(float)

Splits a specified real value into its integer and fractional parts

public static (float Integer, float Fractional) Mod(float x)

Parameters

x float

The real value which should be split into its integer and fractional part

Returns

(float Integer, float Fractional)

The integer and fractional part of x

Mod(float, float)

Computes the remainder of the division of two specified real values

public static float Mod(float x, float y)

Parameters

x float

The real value of the numerator of the division whose remainder should be calculated

y float

The real value of the denominator of the division whose remainder should be calculated. Must not be 0.

Returns

float

The remainder of the division of x by y. The return value is in the range [-y, y].

Remarks

Note: There are no additional checks in place to prevent y from being 0. You must make sure on your own that y is not 0.

Mod(float, out float)

Splits a specified real value into its integer and fractional parts

public static float Mod(float x, out float integerPart)

Parameters

x float

The real value which should be split into its integer and fractional parts

integerPart float

The integer part of x

Returns

float

The fractional part of x

Pow(double, double)

Computes the exponentiation of a specified real value raised to another specified real value

public static double Pow(double x, double y)

Parameters

x double

The real value which should be the base of the exponentiation to be calculated

y double

The real value which shoudl be the exponent of the exponentiation to be calculated

Returns

double

The value of x raised to the power of y

Remarks

If y shall be Euler's number (a.k.a. the base of the natural logarithm e), consider using Exp(double) instead.

This method may use a different approximation across different versions, platforms and configurations. It could return a different value given the same input on different machines or operating systems, or if SDL is updated.

Pow(float, float)

Computes the exponentiation of a specified real value raised to another specified real value

public static float Pow(float x, float y)

Parameters

x float

The real value which should be the base of the exponentiation to be calculated

y float

The real value which shoudl be the exponent of the exponentiation to be calculated

Returns

float

The value of x raised to the power of y

Remarks

If y shall be Euler's number (a.k.a. the base of the natural logarithm e), consider using Exp(float) instead.

This method may use a different approximation across different versions, platforms and configurations. It could return a different value given the same input on different machines or operating systems, or if SDL is updated.

Round(double)

Rounds a specified real value to the nearest integer value

public static double Round(double x)

Parameters

x double

The real value which should get rounded to the nearest integer value

Returns

double

The nearest integer value to x

Remarks

Values for x which are halfway between integers will be rounded away from zero.

Round(float)

Rounds a specified real value to the nearest integer value

public static float Round(float x)

Parameters

x float

The real value which should get rounded to the nearest integer value

Returns

float

The nearest integer value to x

Remarks

Values for x which are halfway between integers will be rounded away from zero.

RoundToInteger(double)

Rounds a specified real value to the nearest integer value

public static long RoundToInteger(double x)

Parameters

x double

The real value which should get rounded to the nearest integer value

Returns

long

The nearest integer value to x

Remarks

Values for x which are halfway between integers will be rounded away from zero.

On Windows, the return value is capped in the range of [MinValue, MaxValue].

The get the result as a floating-point value, you can use Round(double) instead.

RoundToInteger(float)

Rounds a specified real value to the nearest integer value

public static long RoundToInteger(float x)

Parameters

x float

The real value which should get rounded to the nearest integer value

Returns

long

The nearest integer value to x

Remarks

Values for x which are halfway between integers will be rounded away from zero.

On Windows, the return value is capped in the range of [MinValue, MaxValue].

The get the result as a floating-point value, you can use Round(float) instead.

ScaleByPowerOfTwo(double, int)

Scales a specified real value by a specified integer power of two

public static double ScaleByPowerOfTwo(double x, int n)

Parameters

x double

The real value which should get scaled by an integer power of two

n int

The integer exponent to raise two to

Returns

double

The result of x multiplied by two raised to the power of n (x*2^n)

ScaleByPowerOfTwo(float, int)

Scales a specified real value by a specified integer power of two

public static float ScaleByPowerOfTwo(float x, int n)

Parameters

x float

The real value which should get scaled by an integer power of two

n int

The integer exponent to raise two to

Returns

float

The result of x multiplied by two raised to the power of n (x*2^n)

Sin(double)

Computes the sine of a specified real value

public static double Sin(double x)

Parameters

x double

The real value, in radians, whose sine should be calculated

Returns

double

The cosine of x. The return value is in the range [-1, 1].

Remarks

This method may use a different approximation across different versions, platforms and configurations. It could return a different value given the same input on different machines or operating systems, or if SDL is updated.

Sin(float)

Computes the sine of a specified real value

public static float Sin(float x)

Parameters

x float

The real value, in radians, whose sine should be calculated

Returns

float

The cosine of x. The return value is in the range [-1, 1].

Remarks

This method may use a different approximation across different versions, platforms and configurations. It could return a different value given the same input on different machines or operating systems, or if SDL is updated.

Sqrt(double)

Computes the square root of a specified real value

public static double Sqrt(double x)

Parameters

x double

The real value whose square should be calculated. Must be greater than or equal to 0.

Returns

double

The square root of x. The return value is in the range [0, ∞].

Remarks

Note: There are no additional checks in place to prevent x from being less than 0. You must make sure on your own that x is greater than or equal to 0.

This method may use a different approximation across different versions, platforms and configurations. It could return a different value given the same input on different machines or operating systems, or if SDL is updated.

Sqrt(float)

Computes the square root of a specified real value

public static float Sqrt(float x)

Parameters

x float

The real value whose square should be calculated. Must be greater than or equal to 0.

Returns

float

The square root of x. The return value is in the range [0, ∞].

Remarks

Note: There are no additional checks in place to prevent x from being less than 0. You must make sure on your own that x is greater than or equal to 0.

This method may use a different approximation across different versions, platforms and configurations. It could return a different value given the same input on different machines or operating systems, or if SDL is updated.

Tan(double)

Computes the tangent of a specified real value

public static double Tan(double x)

Parameters

x double

The real value, in radians, whose tangent should be calculated

Returns

double

The tangent of x

Remarks

This method may use a different approximation across different versions, platforms and configurations. It could return a different value given the same input on different machines or operating systems, or if SDL is updated.

Tan(float)

Computes the tangent of a specified real value

public static float Tan(float x)

Parameters

x float

The real value, in radians, whose tangent should be calculated

Returns

float

The tangent of x

Remarks

This method may use a different approximation across different versions, platforms and configurations. It could return a different value given the same input on different machines or operating systems, or if SDL is updated.

Trunc(double)

Truncates a specified real value to the next closesest integer value to 0

public static double Trunc(double x)

Parameters

x double

The real value which should get truncated to the next closesest integer value to 0

Returns

double

The next closesest integer value to 0 from x

Remarks

This is equivalent to removing the fractional part of x, only leaving the integer part.

Trunc(float)

Truncates a specified real value to the next closesest integer value to 0

public static float Trunc(float x)

Parameters

x float

The real value which should get truncated to the next closesest integer value to 0

Returns

float

The next closesest integer value to 0 from x

Remarks

This is equivalent to removing the fractional part of x, only leaving the integer part.