Add util for unsigned and signed int. conversion
Will be used in later commit in extended clipboard handling.
This commit is contained in:
committed by
Lauri Kasanen
parent
fdeefcfab4
commit
286694869b
15
kasmweb/core/util/int.js
Normal file
15
kasmweb/core/util/int.js
Normal file
@@ -0,0 +1,15 @@
|
||||
/*
|
||||
* noVNC: HTML5 VNC client
|
||||
* Copyright (C) 2020 The noVNC Authors
|
||||
* Licensed under MPL 2.0 (see LICENSE.txt)
|
||||
*
|
||||
* See README.md for usage and integration instructions.
|
||||
*/
|
||||
|
||||
export function toUnsigned32bit(toConvert) {
|
||||
return toConvert >>> 0;
|
||||
}
|
||||
|
||||
export function toSigned32bit(toConvert) {
|
||||
return toConvert | 0;
|
||||
}
|
||||
Reference in New Issue
Block a user