mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-17 00:41:32 +00:00
srsly
This commit is contained in:
@ -25,7 +25,7 @@ export function bswap<T extends number>(value: T): T {
|
||||
return value;
|
||||
}
|
||||
|
||||
@inline export function bswap16<T extends number>(value: T): T {
|
||||
export function bswap16<T extends number>(value: T): T {
|
||||
if (isInteger<T>() && sizeof<T>() <= 4) {
|
||||
if (sizeof<T>() == 2) {
|
||||
return <T>((value << 8) | ((value >> 8) & <T>0x00FF));
|
||||
|
Reference in New Issue
Block a user