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

13
LINES

< > BotCompany Repo | #1002176 // round - round double to long. also, synonym of roundBracket

JavaX fragment (include)

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

sS round(S s) {
  ret roundBracket(s);
}

ifclass Complex
static Complex round(Complex c) {
  ret Complex(round(c.re), round(c.im));
}
endif

download  show line numbers  debug dex  old transpilations   

Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lnbujpyubztb, lpdgvwnxivlt, mowyntqkapby, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1002176
Snippet name: round - round double to long. also, synonym of roundBracket
Eternal ID of this version: #1002176/5
Text MD5: e166bcba06fee2cea407d62361f28386
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-09-03 05:09:23
Source code size: 206 bytes / 13 lines
Pitched / IR pitched: No / No
Views / Downloads: 710 / 1448
Version history: 4 change(s)
Referenced in: #1002427 - Accellerating 629 (SPIKE)
#1003741 - iround - round to int
#1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1014274 - floor - Math.floor