If you intended the resolution for the min/max distances to be smaller than 1m, you want to use *(float *)arg here (and pass the address of the value on the calling side).

Otherwise, why use a float for the min/max distance at all?