uint16_t SFEVL53L1X::getDistance() { uint16_t distance; _device->VL53L1X_GetDistance(&distance); return (int)distance; } The function return type is uint16_t. Why is there an "(int)" cast in the return statement?
uint16_t SFEVL53L1X::getDistance()
{
uint16_t distance;
_device->VL53L1X_GetDistance(&distance);
return (int)distance;
}
The function return type is uint16_t. Why is there an "(int)" cast in the return statement?