This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections.Generic; | |
| public class JsonVariant { | |
| // Referent | |
| public JsonObject referent = null; | |
| // Floating point number | |
| public float number; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --!strict | |
| local function decodePair(pair: number): (number, number) | |
| -- Get the vertex A and B | |
| return bit32.rshift(pair, 16), bit32.band(pair, 0xFFFF) | |
| end | |
| local function encodePair(a: number, b: number): number | |
| -- Encode A and B | |
| return bit32.bor(bit32.lshift(a, 16), b) | |
| end |
OlderNewer