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

12
LINES

< > BotCompany Repo | #1033659 // setBitInIntArray_littleEndian

JavaX fragment (include) [tags: use-pretranspiled]

Transpiled version (37L) is out of date.

1  
svoid setBitInIntArray_littleEndian(int[] array, int iBit) {
2  
  int iInt = iBit >> 5;
3  
  array[iInt] |= 1 << (iBit & 31);
4  
}
5  
6  
svoid setBitInIntArray_littleEndian(int[] array, int iBit, bool value) {
7  
  int iInt = iBit >> 5;
8  
  if (value)
9  
    array[iInt] |= 1 << (iBit & 31);
10  
  else
11  
    array[iInt] &= ~(1 << (iBit & 31));
12  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1033659
Snippet name: setBitInIntArray_littleEndian
Eternal ID of this version: #1033659/3
Text MD5: b37d2ebd511906c483b14802a7f9b05f
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-12-26 16:34:42
Source code size: 329 bytes / 12 lines
Pitched / IR pitched: No / No
Views / Downloads: 58 / 98
Version history: 2 change(s)
Referenced in: [show references]