Here are the components that Ub3rMath supports in equations. For more information on these components, refer to the documentation
Ub3rMath supports several modes (set with SetMode()) to modify functionality. To set more than one flag, seperate by bitwise or ( | ). A call to SetMode REPLACES any other modes set.
Here are the supported modes:
MODE_RADIANS (Use radians for calculations. Do not sue with MODE_DEGREES)
MODE_DEGREES (Use degrees for calculations. Do not sue with MODE_RADIANS)
MODE_LEFTREM (Remove n= at the beginning of variable setting equations -- see Variables, below. Do not use with MODE_LEFTAPP)
MODE_LEFTAPP (Keep n= at the beginning of variable setting equations -- see Variables, below. Do not use with MODE_LEFTREM)
MODE_FIXED (Output everything in fixed point notation)
MODE_FLOAT (Output everything in floating point notation)
MODE_SCI (Output everything in scientific notation)
MODE_DEFAULT (The default mode. MODE_RADIANS, MODE_FLOAT and MODE_LEFTREM. Do not use with any other flag)
Variable can be set using n=, where n is an alphabetic char other than 'e' (since this is a constant). A Variable class is used to manipulate them.
A few constants are defined and can be used by name. Additional constants can be set via the Constant class.
The available constants are:
pi (3.141592653589793238462643383279)
e (2.718281828459045235360287471352)
Filters can be used to change the output format of the solution. filters are placed at the beginning of an equation, and followed by a '<' symbol. You can define new filters using the Filter class.
Multiple filters can be used in a chain, for example:
bin<hex<255
hex would run first, then bin, giving an output of 0x11111111
Here are the default filters:
hex (output in hexadecimal format)
bin (output in binary format)
oct (output in octal format)
cel2far temperature conversion
far2cel temperature conversion
Differently based numbers are converted to base 10 at runtime. Hexadecimal, Binary and Octal formats are supported.
0xFF (255)
0b11111111 (255)
0o7 (0o377)
[Compiling the library]
[Using the library in projects]
[Features and components]
[Defined Symbols]
[Equation examples]
[Projects that use Ub3rMath]
Wiki: Compiling the library
Wiki: Defined Symbols
Wiki: Equation examples
Wiki: Features and components
Wiki: Home
Wiki: Projects that use Ub3rMath
Wiki: Using the library in projects