Open CASCADE Technology Reference Manual 8.0.0
Loading...
Searching...
No Matches
Functions
Standard_Integer.hxx File Reference
#include <Standard_Std.hxx>
#include <Standard_TypeDef.hxx>
#include <algorithm>
#include <climits>
#include <cmath>

Functions

constexpr int Abs (const int theValue)
 Returns the absolute value of a int Value. Equivalent to std::abs.
 
constexpr bool IsEven (const int theValue)
 Returns true if theValue is even.
 
constexpr bool IsOdd (const int theValue)
 Returns true if theValue is odd.
 
Use std::max instead constexpr int Max (const int theValue1, const int theValue2)
 Returns the maximum value of two integers. Equivalent to std::max.
 
Use std::min instead constexpr int Min (const int theValue1, const int theValue2)
 Returns the minimum value of two integers. Equivalent to std::min.
 
constexpr int Modulus (const int theValue, const int theDivisor)
 Returns the modulus of theValue by theDivisor.
 
constexpr int Square (const int theValue)
 Returns the square of a int theValue. Note that behavior is undefined in case of overflow.
 
constexpr int IntegerFirst ()
 Returns the minimum value of an integer.
 
constexpr int IntegerLast ()
 Returns the maximum value of an integer.
 
constexpr int IntegerSize ()
 Returns the size in bits of an integer.
 

Function Documentation

◆ Abs()

constexpr int Abs ( const int theValue)
constexpr

Returns the absolute value of a int Value. Equivalent to std::abs.

◆ IntegerFirst()

constexpr int IntegerFirst ( )
constexpr

Returns the minimum value of an integer.

◆ IntegerLast()

constexpr int IntegerLast ( )
constexpr

Returns the maximum value of an integer.

◆ IntegerSize()

constexpr int IntegerSize ( )
constexpr

Returns the size in bits of an integer.

◆ IsEven()

constexpr bool IsEven ( const int theValue)
constexpr

Returns true if theValue is even.

◆ IsOdd()

constexpr bool IsOdd ( const int theValue)
constexpr

Returns true if theValue is odd.

◆ Max()

Use std::max instead constexpr int Max ( const int theValue1,
const int theValue2 )
constexpr

Returns the maximum value of two integers. Equivalent to std::max.

Deprecated
("This function duplicates std::max and will be removed in future releases. "

◆ Min()

Use std::min instead constexpr int Min ( const int theValue1,
const int theValue2 )
constexpr

Returns the minimum value of two integers. Equivalent to std::min.

Deprecated
("This function duplicates std::min and will be removed in future releases. "

◆ Modulus()

constexpr int Modulus ( const int theValue,
const int theDivisor )
constexpr

Returns the modulus of theValue by theDivisor.

◆ Square()

constexpr int Square ( const int theValue)
constexpr

Returns the square of a int theValue. Note that behavior is undefined in case of overflow.