Skip to content

Commit 4a794b6

Browse files
committed
fix: resolve 3 lint errors - var order, empty line, use stdlib abs
1 parent df0eb4c commit 4a794b6

File tree

1 file changed

+3
-2
lines changed
  • lib/node_modules/@stdlib/math/base/special/roundnf/test

1 file changed

+3
-2
lines changed

lib/node_modules/@stdlib/math/base/special/roundnf/test/test.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,11 @@ tape( 'the function supports rounding to nearest hundred (n=2)', function test(
9595
});
9696

9797
tape( 'the function supports rounding to nearest thousand (n=3)', function test( t ) {
98-
var v = roundnf( 12368.0, 3 );
9998
var expected = float64ToFloat32( 12000.0 );
99+
var v = roundnf( 12368.0, 3 );
100+
100101
// Due to float32 precision, allow small error (< 1.0)
101-
t.ok( Math.abs( v - expected ) < 1.0, 'returns expected value (within float32 precision)' );
102+
t.ok( abs( v - expected ) < 1.0, 'returns expected value (within float32 precision)' );
102103
t.end();
103104
});
104105

0 commit comments

Comments
 (0)