mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-02-28 11:44:44 +08:00
Colors wip
This commit is contained in:
@@ -58,6 +58,15 @@ export default class Utility {
|
||||
return num.toFixed(decimals)
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {Number} num
|
||||
* @param {Number} decimals
|
||||
*/
|
||||
static roundDecimals(num, decimals = 1) {
|
||||
const power = 10 ** decimals
|
||||
return Math.round(num * power) / power
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {Number[]} viewportLocation
|
||||
* @param {HTMLElement} movementElement
|
||||
|
||||
Reference in New Issue
Block a user