mirror of
https://github.com/voltrevo/ValueScript.git
synced 2026-01-12 23:18:03 -05:00
22 lines
471 B
TypeScript
22 lines
471 B
TypeScript
//! test_output([["0.00","1.23","123.00","0.01","0.00123","12345.68","3.14","-1.00"],["NaN","Infinity"]])
|
|
|
|
export default function () {
|
|
const positive = [
|
|
(0).toFixed(2),
|
|
(1.2345).toFixed(2),
|
|
(123).toFixed(2),
|
|
(0.005678).toFixed(2),
|
|
(0.00123456).toFixed(5),
|
|
(12345.6789).toFixed(2),
|
|
(3.14159).toFixed(2),
|
|
(-1).toFixed(2),
|
|
];
|
|
|
|
const negative = [
|
|
(NaN).toFixed(2),
|
|
(Infinity).toFixed(2),
|
|
];
|
|
|
|
return [positive, negative];
|
|
}
|