UNPKG
@thewtex/vtk.js-esm
Version:
latest (18.4.2-77b22c7239.1)
18.4.2-77b22c7239.1
18.4.2-77b22c7239
Visualization Toolkit for the Web
github.com/kitware/vtk-js
kitware/vtk-js
@thewtex/vtk.js-esm
/
vendor
/
d3-format
/
src
/
precisionPrefix.js
8 lines
(5 loc)
•
237 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
import
{ e
as
exponent }
from
'./exponent.js'
;
function
precisionPrefix
(
step, value
) {
return
Math
.
max
(
0
,
Math
.
max
(-
8
,
Math
.
min
(
8
,
Math
.
floor
(
exponent
(value) /
3
))) *
3
-
exponent
(
Math
.
abs
(step))); }
export
{ precisionPrefix
as
p };