You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/README.md
+18Lines changed: 18 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,5 @@
1
1
# Maths & Random Helper Functions for Unity
2
+
This asset contains a series of maths & random helper functions to assist in calculations in your games.
2
3
3
4
## Setup
4
5
Simply import the package into your project and you're good to go. No additional setup is required.
@@ -8,6 +9,23 @@ Simply import the package into your project and you're good to go. No additional
8
9
- <i>Or</i> add the following line to <i>Packages/manifest.json</i>:</br>``"com.davidfdev.maths": "https://github.com/DavidF-Dev/Unity-MathsHelper.git"``
9
10
10
11
## Usage
12
+
To access the scripts, include the ``DavidFDev.Maths`` namespace to access the ``MathsHelper`` and ``RandomHelper`` static classes.</br>
13
+
Or, alternatively, use ``using static DavidFDev.Maths.MathsHelper`` and ``using static DavidFDev.Maths.RandomHelper`` to use the methods without needing to specify the classname (e.g. ``NextBool()`` instead of ``RandomHelper.NextBool()``).
14
+
15
+
The ``MathsHelper`` class contains many helpful maths methods, such as:
16
+
-``Approach / ApproachAngle : float``
17
+
-``Reduce / ReduceAngle : float``
18
+
-``Sign / SignThreshold : float``
19
+
-``Map10 / Map01 / Map : float``
20
+
-``GetAngle / GetAngleBetween : float``
21
+
-``RotateVector : Vector2``
22
+
23
+
</br>The ``RandomHelper`` class contains various methods for retrieving random values, such as:
If you have any questions or would like to get in contact, shoot me an email at contact@davidfdev.com. Alternatively, you can send me a direct message on Twitter at [@DavidF_Dev](https://twitter.com/DavidF_Dev).</br></br>
0 commit comments