Python sys.float_info.min() Examples

The following are 3 code examples of sys.float_info.min(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module sys.float_info , or try the search function .
Example #1
Source File: FrameTime.py    From blender-ue4-live-link with GNU General Public License v3.0 6 votes vote down vote up
def from_decimal(self, _in_decimal_frame):
        """
        Convert a decimal representation to a frame time
        Note that subframes are always positive, so negative
        decimal representations result in an inverted sub frame
        and floored frame number
        """
        new_frame = math.floor(_in_decimal_frame)

        # Ensure fractional parts above the highest sub frame
        # float precision do not round to 0.0
        fraction = _in_decimal_frame - math.floor(_in_decimal_frame)

        # clamp = max(min(value, max_value), min_value)
        return FrameTime(new_frame,
                         max(min(fraction, float_info.max), float_info.min)) 
Example #2
Source File: MyDoubleValidator.py    From pyweed with GNU Lesser General Public License v3.0 5 votes vote down vote up
def __init__(self, bottom=float_info.min,
                 top=float_info.max,
                 decimals=float_info.dig, parent=None):

        super(MyDoubleValidator, self).__init__(bottom, top, decimals, parent) 
Example #3
Source File: pool.py    From desmod with MIT License 5 votes vote down vote up
def __init__(self, pool: 'Pool', epsilon: float = float_info.min):
        super().__init__(pool, amount=epsilon)