This library contains everything related to mathematics.
calc();
Basic operations with two numbers. See also calc_string(), calc_first(), calc_second().
ONO::Lib::Math->calc( $num1, $num2, $op );
returns: $res
calc_first();
Like calc(), but return the first element ( ? + a = b ).
ONO::Lib::Math->calc_first( $num1, $num2, $op );
returns: $res
calc_second();
Like calc(), but return the second element ( a + ? = c ).
ONO::Lib::Math->calc_second( $num1, $num2, $op );
returns: $res
calc_string();
Similar to calc(), but allows to execute a string including more complex calculations, like ( 3 x 3) + ( 10 / 2 ) = ... for example.
ONO::Lib::Math->calc_string( );
comp();
Compare two numbers, returns, eq, lt, or gt.
ONO::Lib::Math->comp( $num1, $num2 );
returns: $res
fraction_reducer();
Reduce a fraction.
ONO::Lib::Math->fraction_reducer( $a, $b, $optimize_negatives );
returns: ($a,$b)
op_to_symbol();
Operation (add, sub, mul, div) to symbol.
-C colorize (with -H only)
-H html mode (universal mode is optimized for PDF)
ONO::Lib::Math->op_to_symbol( );