Libraryless. Click here for Pure Java version (48L/1K).
static int roundUpTo(int n, int x) { return (x+n-1)/n*n; } static long roundUpTo(long n, long x) { return (x+n-1)/n*n; } static double roundUpTo(double n, double x) { return floor((x+n-1)/n)*n; }
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1001008 |
Snippet name: | roundUpTo - unintuitive argument order |
Eternal ID of this version: | #1001008/5 |
Text MD5: | b8e3a86691a7d9c95ccd05b805343a55 |
Transpilation MD5: | 25a8586200d01a38cc599650bfb8230b |
Author: | stefan |
Category: | |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-10-10 20:30:46 |
Source code size: | 213 bytes / 11 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 738 / 1099 |
Version history: | 4 change(s) |
Referenced in: | [show references] |