Utility functions
        
        
        
Namespaces
Methods
- 
    
staticGOWN.utils.mixin(destination, source){Object}
 - 
    
    
    Mixin utility
Name Type Description destinationObject Destination object sourceObject Source object Returns:
Type Description Object  - 
    
staticGOWN.utils.roundDownToNearest(number, nearest){Number}
 - 
    
    
    Rounds a Number down to the nearest multiple of an input. For example, by rounding 16 down to the nearest 10, you will receive 10. Similar to the built-in function Math.floor().
Name Type Description numberNumber The number to round down nearestNumber The number whose multiple must be found - See:
 - 
        
- Math#floor
 
 
Returns:
Type Description Number The rounded number  - 
    
staticGOWN.utils.roundToNearest(number, nearest){Number}
 - 
    
    
    Rounds a Number up to the nearest multiple of an input. For example, by rounding 16 up to the nearest 10, you will receive 20. Similar to the built-in function Math.ceil().
Name Type Description numberNumber The number to round up nearestNumber The number whose multiple must be found - See:
 - 
        
- Math#ceil
 
 
Returns:
Type Description Number The rounded number  - 
    
staticGOWN.utils.roundToNearest(number, nearest){Number}
 - 
    
    
    Rounds a Number to the nearest multiple of an input. For example, by rounding 16 to the nearest 10, you will receive 20. Similar to the built-in function Math.round().
Name Type Description numberNumber The number to round nearestNumber The number whose multiple must be found - See:
 - 
        
- Math#round
 
 
Returns:
Type Description Number The rounded number  - 
    
staticGOWN.utils.roundToPrecision(number, precision){Number}
 - 
    
    
    Rounds a number to a certain level of precision. Useful for limiting the number of decimal places on a fractional number.
Name Type Description numberNumber The input number to round precisionNumber The number of decimal digits to keep - See:
 - 
        
- Math#round
 
 
Returns:
Type Description Number The rounded number, or the original input if no rounding is needed