added conversions between doubles and floats in coord rotation function