def _scaleSinglePoint ( point , scale = 1 , convertToInteger = True ) : x , y = point if convertToInteger : return int ( round ( x * scale ) ) , int ( round ( y * scale ) ) else : return ( x * scale , y * scale )
how can i scale numbers to a number between 0 and 1 in python
Scale a single point
def _scaleSinglePoint(point, scale=1, convertToInteger=True):
    """
    Scale a single point
    """
    x, y = point
    if convertToInteger:
        return int(round(x * scale)), int(round(y * scale))
    else:
        return (x * scale, y * scale)