sincerely Singaporean

If you have not done so, read this full tutorial on how to use SGEXTN to build an application.

SGLFloatConstants

see header file

see source file

class SGLFloatConstants;

part of SGEXTN module SG_Math

static function class providing numeric constants

detailed description

list of all including inherited members

implementation details

preprocessor file inclusion directive: #include ‹SGLFloatConstants.h›

CMake target for BuildLah: SGEXTN::SG_Math

see this link for more information about BuildLah

parent class: (none)

children classes: (none)

static member functions

static float eulerNumber();

static float goldenRatio();

static float log10OfEulerNumber();

static float log2OfEulerNumber();

static float naturalLogarithmOf10();

static float naturalLogarithmOf2();

static float pi();

static float squareRootOf2();

static float squareRootOf3();

Detailed Description

SGLFloatConstants provides floating point numbers for numeric constants used in mathematics, such as pi and e.

Implementation Details

Uses ‹numbers› from Standard Template Library

static float eulerNumber();

Returns Euler's Number, approximately 2.71828182845904

static float goldenRatio();

Returns the golden ratio, which is (1 + sqrt(5)) / 2.

static float log10OfEulerNumber();

Returns the base10 logarithm of Euler's Number.

static float log2OfEulerNumber();

Returns the base2 logarithm of Euler's Number.

static float naturalLogarithmOf10();

Returns ln(10).

static float naturalLogarithmOf2();

Returns ln(2).

static float pi();

Returns pi, approximately 3.1415926535897932384626433832795028841971

static float squareRootOf2();

Returns sqrt(2).

static float squareRootOf3();

Returns sqrt(3).

©2025 05524F.sg (Singapore)

contact 05524F / report a bug / make a suggestion

about 05524F SINGAPORE values

list of 05524F projects