# Path: Generic/Kernel/GeoUtil/tolerance.py
# TOL = 1e-10


import random
import string 
import types
from math import fmod, pi
from .tolerance import TOL
        from Kernel.GeoEntity.segment import Segment
        from Kernel.GeoEntity.point import Point
        from Kernel.GeoUtil.geolib import Vector
        raise ValueError("Invalid values: xmax < xmin")
    _ymax = get_float(ymax)
    if _ymax < _ymin:
        raise ValueError("Invalid values: ymax < ymin")
    return _xmin, _ymin, _xmax, _ymax
    
def degrees(value):
    """Convert a value from radians to degrees.

degrees(value)

In Python 2.3 this is available as the math.degrees() function, but
the value isn't scaled from -360.0 <= angle <= 360.0
    """
    _value = get_float(value)
    return fmod(_value, 360.0)

def radians(value):
    """
        Convert a value from degrees to radians.
        In Python 2.3 this is available ad the math.radians() function, but
        the value isn't scaled from -2*pi <= angle <= 2*pi
    """
    _value = get_float(value)
    return fmod(_value, (2.0 * pi))

#
# map x/y coordinates to a (x1, y1)->(x2, y2) segment
#


# Path: Generic/Kernel/GeoUtil/tolerance.py
# TOL = 1e-10


# Path: Generic/Kernel/GeoUtil/util.py
import random
import string 
import types
from math import fmod, pi
from .tolerance import TOL
        from Kernel.GeoEntity.segment import Segment
        from Kernel.GeoEntity.point import Point
        from Kernel.GeoUtil.geolib import Vector

        raise ValueError("Invalid values: xmax < xmin")
    _ymax = get_float(ymax)
    if _ymax < _ymin:
        raise ValueError("Invalid values: ymax < ymin")
    return _xmin, _ymin, _xmax, _ymax
    
def degrees(value):
    """Convert a value from radians to degrees.

degrees(value)

In Python 2.3 this is available as the math.degrees() function, but
the value isn't scaled from -360.0 <= angle <= 360.0
    """
    _value = get_float(value)
    return fmod(_value, 360.0)

def radians(value):
    """
        Convert a value from degrees to radians.
        In Python 2.3 this is available ad the math.radians() function, but
        the value isn't scaled from -2*pi <= angle <= 2*pi
    """
    _value = get_float(value)
    return fmod(_value, (2.0 * pi))

#
# map x/y coordinates to a (x1, y1)->(x2, y2) segment
#


def map_coords(x, y, x1, y1, x2, y2, tol = TOL):