Number Manipulation in Go: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
(Created page with "=Internal= * Go Code Examples =Overview= =How to Tell if a Float is Actually an Int=")
 
 
Line 4: Line 4:


=How to Tell if a Float is Actually an Int=
=How to Tell if a Float is Actually an Int=
<syntaxhighlight lang='go'>
return math.Round(f) == f
</syntaxhighlight>

Latest revision as of 01:26, 14 September 2024

Internal

Overview

How to Tell if a Float is Actually an Int

return math.Round(f) == f