mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 07:29:32 +00:00
Improved large number format
This commit is contained in:
parent
547459c4b5
commit
c7dde58970
1 changed files with 2 additions and 1 deletions
|
|
@ -17,7 +17,8 @@ function format_utils.round(num, idp)
|
|||
if math.abs(num) == math.huge then
|
||||
-- This is an infinite, e.g., 1/0 or -1/0
|
||||
res = num
|
||||
elseif num == math.floor(num) then
|
||||
-- elseif num == math.floor(num) then
|
||||
elseif string.find(tostring(num), 'e') == nil then
|
||||
-- This is an integer, so represent it
|
||||
-- without decimals
|
||||
res = string.format("%d", math.floor(num))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue