@stdlib/math-base-special-trunc2 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/NOTICE +1 -1
- package/README.md +12 -14
- package/package.json +7 -7
package/NOTICE
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Copyright (c) 2016-
|
|
1
|
+
Copyright (c) 2016-2026 The Stdlib Authors.
|
package/README.md
CHANGED
|
@@ -106,18 +106,16 @@ v = trunc2( NaN );
|
|
|
106
106
|
<!-- eslint no-undef: "error" -->
|
|
107
107
|
|
|
108
108
|
```javascript
|
|
109
|
-
var
|
|
109
|
+
var uniform = require( '@stdlib/random-array-uniform' );
|
|
110
|
+
var logEachMap = require( '@stdlib/console-log-each-map' );
|
|
110
111
|
var trunc2 = require( '@stdlib/math-base-special-trunc2' );
|
|
111
112
|
|
|
112
|
-
var
|
|
113
|
-
|
|
114
|
-
|
|
113
|
+
var opts = {
|
|
114
|
+
'dtype': 'float64'
|
|
115
|
+
};
|
|
116
|
+
var x = uniform( 100, -50.0, 50.0, opts );
|
|
115
117
|
|
|
116
|
-
|
|
117
|
-
x = (randu()*100.0) - 50.0;
|
|
118
|
-
v = trunc2( x );
|
|
119
|
-
console.log( 'Value: %d. Rounded: %d.', x, v );
|
|
120
|
-
}
|
|
118
|
+
logEachMap( 'x: %0.4f. Rounded: %0.4f.', x, trunc2 );
|
|
121
119
|
```
|
|
122
120
|
|
|
123
121
|
</section>
|
|
@@ -253,7 +251,7 @@ See [LICENSE][stdlib-license].
|
|
|
253
251
|
|
|
254
252
|
## Copyright
|
|
255
253
|
|
|
256
|
-
Copyright © 2016-
|
|
254
|
+
Copyright © 2016-2026. The Stdlib [Authors][stdlib-authors].
|
|
257
255
|
|
|
258
256
|
</section>
|
|
259
257
|
|
|
@@ -266,8 +264,8 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors].
|
|
|
266
264
|
[npm-image]: http://img.shields.io/npm/v/@stdlib/math-base-special-trunc2.svg
|
|
267
265
|
[npm-url]: https://npmjs.org/package/@stdlib/math-base-special-trunc2
|
|
268
266
|
|
|
269
|
-
[test-image]: https://github.com/stdlib-js/math-base-special-trunc2/actions/workflows/test.yml/badge.svg?branch=v0.3.
|
|
270
|
-
[test-url]: https://github.com/stdlib-js/math-base-special-trunc2/actions/workflows/test.yml?query=branch:v0.3.
|
|
267
|
+
[test-image]: https://github.com/stdlib-js/math-base-special-trunc2/actions/workflows/test.yml/badge.svg?branch=v0.3.1
|
|
268
|
+
[test-url]: https://github.com/stdlib-js/math-base-special-trunc2/actions/workflows/test.yml?query=branch:v0.3.1
|
|
271
269
|
|
|
272
270
|
[coverage-image]: https://img.shields.io/codecov/c/github/stdlib-js/math-base-special-trunc2/main.svg
|
|
273
271
|
[coverage-url]: https://codecov.io/github/stdlib-js/math-base-special-trunc2?branch=main
|
|
@@ -279,8 +277,8 @@ Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors].
|
|
|
279
277
|
|
|
280
278
|
-->
|
|
281
279
|
|
|
282
|
-
[chat-image]: https://img.shields.io/
|
|
283
|
-
[chat-url]: https://
|
|
280
|
+
[chat-image]: https://img.shields.io/badge/zulip-join_chat-brightgreen.svg
|
|
281
|
+
[chat-url]: https://stdlib.zulipchat.com
|
|
284
282
|
|
|
285
283
|
[stdlib]: https://github.com/stdlib-js/stdlib
|
|
286
284
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stdlib/math-base-special-trunc2",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "Round a numeric value to the nearest power of two toward zero.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": {
|
|
@@ -33,13 +33,13 @@
|
|
|
33
33
|
"url": "https://github.com/stdlib-js/stdlib/issues"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@stdlib/math-base-assert-is-infinite": "^0.2.
|
|
37
|
-
"@stdlib/math-base-assert-is-nan": "^0.2.
|
|
38
|
-
"@stdlib/math-base-napi-unary": "^0.2.
|
|
39
|
-
"@stdlib/math-base-special-floor": "^0.2.
|
|
40
|
-
"@stdlib/math-base-special-log2": "^0.3.
|
|
36
|
+
"@stdlib/math-base-assert-is-infinite": "^0.2.3",
|
|
37
|
+
"@stdlib/math-base-assert-is-nan": "^0.2.3",
|
|
38
|
+
"@stdlib/math-base-napi-unary": "^0.2.7",
|
|
39
|
+
"@stdlib/math-base-special-floor": "^0.2.4",
|
|
40
|
+
"@stdlib/math-base-special-log2": "^0.3.1",
|
|
41
41
|
"@stdlib/math-base-special-pow": "^0.3.0",
|
|
42
|
-
"@stdlib/utils-library-manifest": "^0.2.
|
|
42
|
+
"@stdlib/utils-library-manifest": "^0.2.4"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {},
|
|
45
45
|
"engines": {
|