Fix data type of ptrX and ptrY (int* -> float*)