mirror of
https://github.com/LCPQ/QUESTDB_website.git
synced 2024-12-27 06:43:47 +01:00
19 lines
284 B
JavaScript
19 lines
284 B
JavaScript
|
function noNanPrecision(number,precision)
|
||
|
{
|
||
|
if(Number.isNaN(number)){
|
||
|
return ""
|
||
|
}
|
||
|
else {
|
||
|
return number.toPrecision(precision)
|
||
|
}
|
||
|
}
|
||
|
|
||
|
function noNanFixed(number,precision)
|
||
|
{
|
||
|
if(Number.isNaN(number)){
|
||
|
return ""
|
||
|
}
|
||
|
else {
|
||
|
return number.toFixed(precision)
|
||
|
}
|
||
|
}
|