Skip to content

Commit d1481b5

Browse files
committed
2 parents 6f44bc9 + c366a08 commit d1481b5

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

.github/README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Maths & Random Helper Functions for Unity
2+
This asset contains a series of maths & random helper functions to assist in calculations in your games.
23

34
## Setup
45
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
89
- <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"``
910

1011
## 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:
24+
- ``Next : bool/float/int/Angle/Colour/Vector2/Vector3``
25+
- ``Range : float/Vector2/Vector3``
26+
- ``MinusOneToOne / MinusOneOrOne() : float``
27+
- ``Chance : bool``
28+
- ``Choose : Element``
1129

1230
## Contact
1331
If you have any questions or would like to get in contact, shoot me an email at [email protected]. Alternatively, you can send me a direct message on Twitter at [@DavidF_Dev](https://twitter.com/DavidF_Dev).</br></br>

0 commit comments

Comments
 (0)