Libraryless. Click here for Pure Java version (37L/1K).
static int ubyteFromBits(bool b7, bool b6, bool b5, bool b4, bool b3, bool b2, bool b1, bool b0) { ret (b7 ? 1 : 0) << 7 | (b6 ? 1 : 0) << 6 | (b5 ? 1 : 0) << 5 | (b4 ? 1 : 0) << 4 | (b3 ? 1 : 0) << 3 | (b2 ? 1 : 0) << 2 | (b1 ? 1 : 0) << 1 | (b0 ? 1 : 0); }
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
Snippet ID: | #1035025 |
Snippet name: | ubyteFromBits |
Eternal ID of this version: | #1035025/1 |
Text MD5: | f846fdfa1e4cc7cc143f96f4cff46143 |
Transpilation MD5: | 424a423b10109a288f9f893492f3a5d7 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-03-23 02:53:25 |
Source code size: | 297 bytes / 10 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 132 / 178 |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) |