Skip to content

Instantly share code, notes, and snippets.

View magicoal-nerb's full-sized avatar
💭
leelee,e

magical_noob magicoal-nerb

💭
leelee,e
View GitHub Profile
using System;
using System.Collections.Generic;
public class JsonVariant {
// Referent
public JsonObject referent = null;
// Floating point number
public float number;
@magicoal-nerb
magicoal-nerb / mergesort.luau
Last active January 18, 2026 23:39
stack based merge sort
--!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