def clamp_to_water(p, water_depth):
    """Clamps a height to be above water level as defined in the given parameter.
    If the value gets clamped, it returns True, otherwise it returns False"""
    if p. y <= water_depth:
        p. y = water_depth
        return True

    return False