More cleanup

This commit is contained in:
be5invis 2022-07-17 00:54:59 -07:00
parent e61edd0db9
commit 4a418cd473
58 changed files with 198 additions and 195 deletions

View file

@ -1,24 +1,18 @@
function struct(leader, ...items) {
export function struct(leader, ...items) {
return "" + leader + "(" + items.join(";") + ")";
}
function tuple(...items) {
export function tuple(...items) {
return "(" + items.join(";") + ")";
}
function list(items) {
export function list(items) {
return "{" + items.join(";") + "}";
}
function n(x) {
export function n(x) {
return String(Math.round(x * 0x10000));
}
function typedPoint(z) {
export function typedPoint(z) {
return tuple(z.type, n(z.x), n(z.y));
}
function gizmo(g) {
export function gizmo(g) {
return tuple(n(g.xx), n(g.xy), n(g.yx), n(g.yy), n(g.x), n(g.y));
}
export { struct };
export { tuple };
export { list };
export { n };
export { typedPoint };
export { gizmo };