UnityEssentials
Small but useful tools and features for Unity
Static Public Member Functions | List of all members
UnityEngine.MathfExtensions Class Reference

Extensions for the Mathf class More...

Collaboration diagram for UnityEngine.MathfExtensions:
Collaboration graph

Static Public Member Functions

static bool IsMultipleOf (this float v, float n, float tolerance=0.001f)
 Calculates if the float is multiple of another float. More...
 
static bool IsMultipleOf (this float v, int n, float tolerance=0.001f)
 Calculates if the float is multiple of an int. More...
 
static bool IsMultipleOf (this int v, int n)
 Calculates if the int is multiple of another int. More...
 
static bool IsMultipleOf (this int v, float n, float tolerance=0.001f)
 Calculates if the int is multiple of a float. More...
 

Detailed Description

Extensions for the Mathf class

Definition at line 10 of file MathfExtensions.cs.

Member Function Documentation

◆ IsMultipleOf() [1/4]

static bool UnityEngine.MathfExtensions.IsMultipleOf ( this float  v,
float  n,
float  tolerance = 0.001f 
)
static

Calculates if the float is multiple of another float.

Parameters
nThe number that we want to know if it is multiple of.
toleranceThe tolerance that we want to set to deal with potential mathematical errors.
Returns

Definition at line 18 of file MathfExtensions.cs.

◆ IsMultipleOf() [2/4]

static bool UnityEngine.MathfExtensions.IsMultipleOf ( this float  v,
int  n,
float  tolerance = 0.001f 
)
static

Calculates if the float is multiple of an int.

Parameters
nThe number that we want to know if it is multiple of.
toleranceThe tolerance that we want to set to deal with potential mathematical errors.
Returns

Definition at line 28 of file MathfExtensions.cs.

◆ IsMultipleOf() [3/4]

static bool UnityEngine.MathfExtensions.IsMultipleOf ( this int  v,
float  n,
float  tolerance = 0.001f 
)
static

Calculates if the int is multiple of a float.

Parameters
nThe number that we want to know if it is multiple of.
toleranceThe tolerance that we want to set to deal with potential mathematical errors.
Returns

Definition at line 47 of file MathfExtensions.cs.

◆ IsMultipleOf() [4/4]

static bool UnityEngine.MathfExtensions.IsMultipleOf ( this int  v,
int  n 
)
static

Calculates if the int is multiple of another int.

Parameters
nThe number that we want to know if it is multiple of.
Returns

Definition at line 37 of file MathfExtensions.cs.


The documentation for this class was generated from the following file: