Math lib is reworked: add/sub/mul routines are used for calculations.
Fixed regression bug: cubic curves were transformed to lines.