UniversalFunctions 0.1.2__tar.gz → 1.0.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {universalfunctions-0.1.2/UniversalFunctions.egg-info → universalfunctions-1.0.1}/PKG-INFO +1 -1
- {universalfunctions-0.1.2 → universalfunctions-1.0.1}/UF/HelperFunctions.py +1 -19
- universalfunctions-1.0.1/UF/Trigonometry.py +37 -0
- {universalfunctions-0.1.2 → universalfunctions-1.0.1}/UF/__init__.py +7 -1
- {universalfunctions-0.1.2 → universalfunctions-1.0.1/UniversalFunctions.egg-info}/PKG-INFO +1 -1
- {universalfunctions-0.1.2 → universalfunctions-1.0.1}/UniversalFunctions.egg-info/SOURCES.txt +1 -0
- {universalfunctions-0.1.2 → universalfunctions-1.0.1}/pyproject.toml +1 -1
- {universalfunctions-0.1.2 → universalfunctions-1.0.1}/LICENSE +0 -0
- {universalfunctions-0.1.2 → universalfunctions-1.0.1}/README.md +0 -0
- {universalfunctions-0.1.2 → universalfunctions-1.0.1}/UF/ClassToDict.py +0 -0
- {universalfunctions-0.1.2 → universalfunctions-1.0.1}/UF/DecoratorArchive.py +0 -0
- {universalfunctions-0.1.2 → universalfunctions-1.0.1}/UF/GetVariable.py +0 -0
- {universalfunctions-0.1.2 → universalfunctions-1.0.1}/UF/StringCheck.py +0 -0
- {universalfunctions-0.1.2 → universalfunctions-1.0.1}/UF/Validators/QuantumFuncValidators.py +0 -0
- {universalfunctions-0.1.2 → universalfunctions-1.0.1}/UF/Validators/QuantumValidators.py +0 -0
- {universalfunctions-0.1.2 → universalfunctions-1.0.1}/UF/Validators/ValidationClasses.py +0 -0
- {universalfunctions-0.1.2 → universalfunctions-1.0.1}/UF/Validators/__init__.py +0 -0
- {universalfunctions-0.1.2 → universalfunctions-1.0.1}/UniversalFunctions.egg-info/dependency_links.txt +0 -0
- {universalfunctions-0.1.2 → universalfunctions-1.0.1}/UniversalFunctions.egg-info/top_level.txt +0 -0
- {universalfunctions-0.1.2 → universalfunctions-1.0.1}/setup.cfg +0 -0
- {universalfunctions-0.1.2 → universalfunctions-1.0.1}/tests/__init__.py +0 -0
- {universalfunctions-0.1.2 → universalfunctions-1.0.1}/tests/test_ClassToDict.py +0 -0
|
@@ -11,7 +11,7 @@ range_f -> acts like the conventional range function except for that this takes
|
|
|
11
11
|
|
|
12
12
|
from typing import Any, Annotated
|
|
13
13
|
from collections.abc import Generator
|
|
14
|
-
from math import sqrt
|
|
14
|
+
from math import sqrt
|
|
15
15
|
from .GetVariable import get_num
|
|
16
16
|
from .DecoratorArchive import cls_deco_superposition
|
|
17
17
|
from .ClassToDict import classes_to_dict
|
|
@@ -89,24 +89,6 @@ class HelperFunctions:
|
|
|
89
89
|
|
|
90
90
|
helper = HelperFunctions
|
|
91
91
|
|
|
92
|
-
@qtm_validation_decorator
|
|
93
|
-
def sine(angle: Real) -> Real:
|
|
94
|
-
"""
|
|
95
|
-
Calculates the sine of a given angle
|
|
96
|
-
:param angle: value required in degrees
|
|
97
|
-
:return: sine value
|
|
98
|
-
"""
|
|
99
|
-
return sin(radians(angle))
|
|
100
|
-
|
|
101
|
-
@qtm_validation_decorator
|
|
102
|
-
def cosine(angle: Real) -> Real:
|
|
103
|
-
"""
|
|
104
|
-
Calculates the cosine of a given angle
|
|
105
|
-
:param angle: value required in degrees
|
|
106
|
-
:return: cosine value
|
|
107
|
-
"""
|
|
108
|
-
return cos(radians(angle))
|
|
109
|
-
|
|
110
92
|
@qtm_validation_decorator
|
|
111
93
|
def range_f(start: Real, stop: Real, step: Annotated[Real, Positive()]) -> Generator[Real,Any,None]:
|
|
112
94
|
"""
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
from math import (
|
|
2
|
+
radians,
|
|
3
|
+
degrees,
|
|
4
|
+
sin,
|
|
5
|
+
cos,
|
|
6
|
+
asin,
|
|
7
|
+
)
|
|
8
|
+
from numbers import Real
|
|
9
|
+
from .Validators.QuantumFuncValidators import qtm_validation_decorator
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@qtm_validation_decorator
|
|
13
|
+
def sine(angle: Real) -> Real:
|
|
14
|
+
"""
|
|
15
|
+
Calculates the sine of a given angle
|
|
16
|
+
:param angle: value required in degrees
|
|
17
|
+
:return: sine value
|
|
18
|
+
"""
|
|
19
|
+
return sin(radians(angle))
|
|
20
|
+
|
|
21
|
+
@qtm_validation_decorator
|
|
22
|
+
def cosine(angle: Real) -> Real:
|
|
23
|
+
"""
|
|
24
|
+
Calculates the cosine of a given angle
|
|
25
|
+
:param angle: value required in degrees
|
|
26
|
+
:return: cosine value
|
|
27
|
+
"""
|
|
28
|
+
return cos(radians(angle))
|
|
29
|
+
|
|
30
|
+
@qtm_validation_decorator
|
|
31
|
+
def asine(angle: Real) -> Real:
|
|
32
|
+
"""
|
|
33
|
+
Calculates the asine of a given angle
|
|
34
|
+
:param angle: real value
|
|
35
|
+
:return: asine value
|
|
36
|
+
"""
|
|
37
|
+
return degrees(asin(angle))
|
|
@@ -21,8 +21,13 @@ not be changed!
|
|
|
21
21
|
from .ClassToDict import classes_to_dict
|
|
22
22
|
from .DecoratorArchive import deco_superposition, cls_deco_superposition
|
|
23
23
|
from .GetVariable import get_num
|
|
24
|
-
from .HelperFunctions import
|
|
24
|
+
from .HelperFunctions import (
|
|
25
|
+
helper,
|
|
26
|
+
HelperFunctions,
|
|
27
|
+
range_f,
|
|
28
|
+
)
|
|
25
29
|
from .StringCheck import get_str
|
|
30
|
+
from .Trigonometry import sine, cosine, asine
|
|
26
31
|
from .Validators.ValidationClasses import (
|
|
27
32
|
TypeValidate,
|
|
28
33
|
Positive,
|
|
@@ -47,6 +52,7 @@ __all__ = [
|
|
|
47
52
|
"HelperFunctions",
|
|
48
53
|
"sine",
|
|
49
54
|
"cosine",
|
|
55
|
+
"asine",
|
|
50
56
|
"range_f",
|
|
51
57
|
"get_str",
|
|
52
58
|
"TypeValidate",
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "UniversalFunctions"
|
|
7
|
-
version = "0.1
|
|
7
|
+
version = "1.0.1"
|
|
8
8
|
description = "A Python utility library providing foundational functions, validators, and infrastructure."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.14"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{universalfunctions-0.1.2 → universalfunctions-1.0.1}/UF/Validators/QuantumFuncValidators.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{universalfunctions-0.1.2 → universalfunctions-1.0.1}/UniversalFunctions.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|