mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-25 18:50:56 +02:00
moved a bunch of files
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
/**
|
||||
* Rounds a number to two decimal places.
|
||||
* @param decimal A decimal value to trim to two places.
|
||||
*/
|
||||
export function roundToTwo(decimal: number): number {
|
||||
const leftShift: number = Math.round(parseFloat(`${decimal}e+2`));
|
||||
|
||||
return +`${leftShift}e-2`;
|
||||
}
|
||||
Reference in New Issue
Block a user