plugins/image/src/util/bit_utils library

Functions

countTrailingZeroBits(int v) int
Count the consecutive zero bits (trailing) on the right in parallel https://graphics.stanford.edu/~seander/bithacks.html#ZerosOnRightParallel
debugBits32(int? value) String
float32ToUint32(double d) int
Binary conversion of a float32 to an uint32. This is equivalent in C to typecasting a float to unsigned int.
int32ToUint32(int d) int
Binary conversion of an int32 to a uint32. This is equivalent in C to typecasting an int to an unsigned int.
shiftL(int v, int n) int
shiftR(int v, int n) int
uint16ToInt16(int d) int
Binary conversion of a uint16 to an int16. This is equivalent in C to typecasting an unsigned short to a short.
uint32ToFloat32(int d) double
Binary conversion of a uint32 to an float32. This is equivalent in C to typecasting an unsigned int to float.
uint32ToInt32(int d) int
Binary conversion of a uint32 to an int32. This is equivalent in C to typecasting an unsigned int to signed int.
uint64ToFloat64(int d) double
Binary conversion of a uint64 to an float64. This is equivalent in C to typecasting an unsigned long long to double.
uint8ToInt8(int d) int
Binary conversion of a uint8 to an int8. This is equivalent in C to typecasting an unsigned char to a char.