add cmath to BaseImage