Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

9
LINES

< > BotCompany Repo | #1003741 // iround - round to int

JavaX fragment (include)

static int iround(double d) {
  ret (int) Math.round(d);
}

ifndef iround_noGeneric
static int iround(Number n) {
  ret iround(toDouble(n));
}
endifndef

Author comment

Began life as a copy of #1002176

download  show line numbers  debug dex  old transpilations   

Travelled to 22 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, ekrmjmnbrukm, elmgxqgtpvxh, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mowyntqkapby, mqqgnosmbjvj, ofpaelxlmzfo, podlckwnjdmb, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt, wnsclhtenguj, xrpafgyirdlv

No comments. add comment

Snippet ID: #1003741
Snippet name: iround - round to int
Eternal ID of this version: #1003741/3
Text MD5: da5798988c038eb69781f60a59640987
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-08-09 20:21:10
Source code size: 160 bytes / 9 lines
Pitched / IR pitched: No / No
Views / Downloads: 652 / 3143
Version history: 2 change(s)
Referenced in: #1005132 - roundtoInt - synonym of iround
#1005956 - iceil - round up to int
#1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1023132 - lround - round to long
#1029772 - iroundHalfDown - round down when exactly .5
#1035529 - iround_clamp - round to int, clamp to int range