Helper function added to EXTMath