Libraryless. Click here for Pure Java version (5030L/28K).
sbool inRange(int x, int n) { ret x >= 0 && x < n; } sbool inRange(int x, L l) { ret inRange(x, l(l)); } sbool inRange(int x, int a, int b) { ret x >= a && x < b; }
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1003928 |
Snippet name: | inRange - checks if 0 <= x < n - or a <= x < b |
Eternal ID of this version: | #1003928/5 |
Text MD5: | 368282834fb29cd80ba00f9932980cb1 |
Transpilation MD5: | 232b55fc1910129b988ab61308bddf99 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-03-06 20:24:39 |
Source code size: | 182 bytes / 11 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 599 / 686 |
Version history: | 4 change(s) |
Referenced in: | [show references] |