@thi.ng/binary
Advanced tools
Comparing version 3.4.42 to 3.4.43
# Change Log | ||
- **Last updated**: 2025-01-29T16:25:48Z | ||
- **Last updated**: 2025-02-13T16:03:11Z | ||
- **Generator**: [thi.ng/monopub](https://thi.ng/monopub) | ||
@@ -5,0 +5,0 @@ |
@@ -7,3 +7,3 @@ import type { FnU3 } from "@thi.ng/api"; | ||
* @param x - value | ||
* @param bit - bit number (0..31) | ||
* @param bit - bit number `(0,31)` | ||
*/ | ||
@@ -22,3 +22,3 @@ export declare const bitClear: (x: number, bit: Bit) => number; | ||
* @param x - value | ||
* @param bit - bit number (0..31) | ||
* @param bit - bit number `(0,31)` | ||
*/ | ||
@@ -25,0 +25,0 @@ export declare const bitSet: (x: number, bit: Bit) => number; |
@@ -11,4 +11,4 @@ import type { FnN, FnN2 } from "@thi.ng/api"; | ||
/** | ||
* Returns i32 representation of f64 as [hi, lo] tuple (takes | ||
* environment's Little Endianess into account). | ||
* Returns i32 representation of f64 as `[hi, lo]` tuple (takes environment's | ||
* Little Endianess into account). | ||
* | ||
@@ -19,4 +19,4 @@ * @param x - | ||
/** | ||
* Returns u32 representation of f64 as [hi, lo] tuple (takes | ||
* environment's Little Endianess into account). | ||
* Returns u32 representation of f64 as `[hi, lo]` tuple (takes environment's | ||
* Little Endianess into account). | ||
* | ||
@@ -46,2 +46,3 @@ * @param x - | ||
* References: | ||
* | ||
* - https://github.com/tzaeschke/phtree/blob/develop/PhTreeRevisited.pdf (page | ||
@@ -54,3 +55,3 @@ * 3) | ||
/** | ||
* Converts normalized float ([-1..1] range) to u8. | ||
* Converts normalized float (`[-1,1]` range) to u8. | ||
* | ||
@@ -61,3 +62,3 @@ * @param x - | ||
/** | ||
* Converts normalized float ([-1..1] range) to u16. | ||
* Converts normalized float (`[-1,1]` range) to u16. | ||
* | ||
@@ -68,3 +69,3 @@ * @param x - | ||
/** | ||
* Converts normalized float ([-1..1] range) to u24. | ||
* Converts normalized float (`[-1,1]` range) to u24. | ||
* | ||
@@ -75,3 +76,3 @@ * @param x - | ||
/** | ||
* Converts normalized float ([-1..1] range) to u32. | ||
* Converts normalized float (`[-1,1]` range) to u32. | ||
* | ||
@@ -78,0 +79,0 @@ * @param x - |
@@ -9,3 +9,3 @@ import type { FnN } from "@thi.ng/api"; | ||
* Reference: | ||
* - https://en.wikipedia.org/wiki/Gray_code | ||
* https://en.wikipedia.org/wiki/Gray_code | ||
* | ||
@@ -20,5 +20,5 @@ * @param x - u32 | ||
* Reference: | ||
* - https://en.wikipedia.org/wiki/Gray_code | ||
* https://en.wikipedia.org/wiki/Gray_code | ||
*/ | ||
export declare const decodeGray32: FnN; | ||
//# sourceMappingURL=gray.d.ts.map |
import type { FnN } from "@thi.ng/api"; | ||
/** | ||
* Converts signed i8 to unsigned u8 value. Input is assumed to be in | ||
* [-0x80,0x7f] range. Does NOT perform clamping. Branchless. | ||
* `[-0x80,0x7f]` range. Does NOT perform clamping. Branchless. | ||
* | ||
@@ -12,3 +12,3 @@ * @param x | ||
* Converts signed i16 to unsigned u16 value. Input is assumed to be in | ||
* [-0x8000,0x7fff] range. Does NOT perform clamping. Branchless. | ||
* `[-0x8000,0x7fff]` range. Does NOT perform clamping. Branchless. | ||
* | ||
@@ -15,0 +15,0 @@ * @param x |
{ | ||
"name": "@thi.ng/binary", | ||
"version": "3.4.42", | ||
"version": "3.4.43", | ||
"description": "100+ assorted binary / bitwise operations, conversions, utilities, lookup tables", | ||
@@ -42,7 +42,7 @@ "type": "module", | ||
"dependencies": { | ||
"@thi.ng/api": "^8.11.19" | ||
"@thi.ng/api": "^8.11.20" | ||
}, | ||
"devDependencies": { | ||
"esbuild": "^0.24.2", | ||
"typedoc": "^0.27.6", | ||
"esbuild": "^0.25.0", | ||
"typedoc": "^0.27.7", | ||
"typescript": "^5.7.3" | ||
@@ -137,3 +137,3 @@ }, | ||
}, | ||
"gitHead": "fc1d498e8d4b690db873c30cc594352a804e7a65\n" | ||
"gitHead": "9a0b33253fef092aaf301decf6ecd54317874d4c\n" | ||
} |
import type { FnN, FnN3 } from "@thi.ng/api"; | ||
import type { Lane16, Lane2, Lane4, Lane8 } from "./api.js"; | ||
/** | ||
* Extracts 16-bit lane from given 32bit uint and returns as unsigned | ||
* half word [0x0000 .. 0xffff]. | ||
* Extracts 16-bit lane from given 32bit uint and returns as unsigned half word | ||
* `[0x0000,0xffff]`. | ||
* | ||
@@ -15,4 +15,4 @@ * - Lane #0: bits 16-31 | ||
/** | ||
* Extracts 8-bit lane from given 32bit uint and returns as unsigned | ||
* byte [0x00 .. 0xff]. | ||
* Extracts 8-bit lane from given 32bit uint and returns as unsigned byte | ||
* `[0x00,0xff]`. | ||
* | ||
@@ -29,4 +29,4 @@ * - Lane #0: bits 24-31 | ||
/** | ||
* Extracts 4-bit lane from given 32bit uint and returns as unsigned | ||
* nibble [0x00 .. 0x0f]. | ||
* Extracts 4-bit lane from given 32bit uint and returns as unsigned nibble | ||
* `[0x00,0x0f]`. | ||
* | ||
@@ -33,0 +33,0 @@ * - Lane #0: bits 28-31 |
48231
1006
Updated@thi.ng/api@^8.11.20