Home
Random
Recent changes
Special pages
Community portal
Settings
About ElWiki
Disclaimers
Elwiki
Search
User menu
Create account
Log in
Module:CommonFunctions: Difference between revisions
Module
Discussion
← Older edit
Newer edit →
Module:CommonFunctions
(view source)
Revision as of 09:28, 25 September 2022
159 bytes removed
,
25 September 2022
no edit summary
Revision as of 09:27, 25 September 2022
(
view source
)
Ritsu
(
talk
|
contribs
)
No edit summary
← Older edit
Revision as of 09:28, 25 September 2022
(
view source
)
Ritsu
(
talk
|
contribs
)
No edit summary
Tag
:
Reverted
Newer edit →
Line 137:
Line 137:
end
end
function
math.round(num
, decimals
)
math.round
= function
(num)
decimals = math.pow(10, decimals or 0)
return
math.floor(num+.5)
num = num * decimals
if num >= 0 then num =
math.floor(num +
0
.5)
else num = math.ceil(num - 0.5) end
return num / decimals
end
end
Ritsu
ElEditors,
Interface administrators
,
Administrators
70,630
edits