revise abs function to be fabsf and cast CGFloat to Float