Ported all React maths to Math library

Signed-off-by:thehutch <th3hutch@yahoo.co.uk>