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

3
LINES

< > BotCompany Repo | #1006793 // moddistance - distance on a circle

JavaX fragment (include)

1  
static int moddistance(int a, int b, int n) {
2  
  ret min(mod(a-b, n), mod(b-a, n));
3  
}

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: #1006793
Snippet name: moddistance - distance on a circle
Eternal ID of this version: #1006793/1
Text MD5: fc681bd90dc15ba4a1579e7b6df97602
Author: stefan
Category: javax / maths
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-02-04 05:12:56
Source code size: 86 bytes / 3 lines
Pitched / IR pitched: No / No
Views / Downloads: 448 / 490
Referenced in: [show references]