summaryrefslogtreecommitdiff
path: root/core/util/int.js
diff options
context:
space:
mode:
Diffstat (limited to 'core/util/int.js')
-rw-r--r--core/util/int.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/core/util/int.js b/core/util/int.js
new file mode 100644
index 0000000..001f40f
--- /dev/null
+++ b/core/util/int.js
@@ -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;
+}