| 1 |
# SPDX-License-Identifier: LGPL-2.1-or-later |
| 2 |
|
| 3 |
from PyObjectBase import PyObjectBase |
| 4 |
|
| 5 |
class Precision(PyObjectBase): |
| 6 |
""" |
| 7 |
This is the Precision class |
| 8 |
|
| 9 |
Author: Werner Mayer ([email protected]) |
| 10 |
Licence: LGPL |
| 11 |
""" |
| 12 |
|
| 13 |
@staticmethod |
| 14 |
def angular() -> float: |
| 15 |
""" |
| 16 |
Returns the recommended precision value when checking the equality of two angles (given in radians) |
| 17 |
""" |
| 18 |
... |
| 19 |
|
| 20 |
@staticmethod |
| 21 |
def confusion() -> float: |
| 22 |
""" |
| 23 |
Returns the recommended precision value when checking coincidence of two points in real space |
| 24 |
""" |
| 25 |
... |
| 26 |
|
| 27 |
@staticmethod |
| 28 |
def squareConfusion() -> float: |
| 29 |
""" |
| 30 |
Returns square of confusion |
| 31 |
""" |
| 32 |
... |
| 33 |
|
| 34 |
@staticmethod |
| 35 |
def intersection() -> float: |
| 36 |
""" |
| 37 |
Returns the precision value in real space, frequently used by intersection algorithms |
| 38 |
""" |
| 39 |
... |
| 40 |
|
| 41 |
@staticmethod |
| 42 |
def approximation() -> float: |
| 43 |
""" |
| 44 |
Returns the precision value in real space, frequently used by approximation algorithms |
| 45 |
""" |
| 46 |
... |
| 47 |
|
| 48 |
@staticmethod |
| 49 |
def parametric() -> float: |
| 50 |
""" |
| 51 |
Convert a real space precision to a parametric space precision |
| 52 |
""" |
| 53 |
... |
| 54 |
|
| 55 |
@staticmethod |
| 56 |
def isInfinite() -> bool: |
| 57 |
""" |
| 58 |
Returns True if R may be considered as an infinite number |
| 59 |
""" |
| 60 |
... |
| 61 |
|
| 62 |
@staticmethod |
| 63 |
def isPositiveInfinite() -> bool: |
| 64 |
""" |
| 65 |
Returns True if R may be considered as a positive infinite number |
| 66 |
""" |
| 67 |
... |
| 68 |
|
| 69 |
@staticmethod |
| 70 |
def isNegativeInfinite() -> bool: |
| 71 |
""" |
| 72 |
Returns True if R may be considered as a negative infinite number |
| 73 |
""" |
| 74 |
... |
| 75 |
|
| 76 |
@staticmethod |
| 77 |
def infinite() -> float: |
| 78 |
""" |
| 79 |
Returns a big number that can be considered as infinite |
| 80 |
""" |
| 81 |
... |