Skip to content

Instantly share code, notes, and snippets.

using UnityEngine;
namespace OH.Vectors
{
public static class Swizzles
{
public static Vector2 XX(this Vector2 V){ return MkVector2(V.x, V.x); }
public static Vector2 XY(this Vector2 V){ return MkVector2(V.x, V.y); }
public static Vector2 X_(this Vector2 V){ return MkVector2(V.x, 0); }
public static Vector2 YX(this Vector2 V){ return MkVector2(V.y, V.x); }
@OswaldHurlem
OswaldHurlem / pun_x11_colors.h
Created May 5, 2017 09:23
Metaprogramming a named color palette for Punity
/*<<<
x11Colors = [
("X11_BLACK", "0x00, 0x00, 0x00"),
("X11_WHITE", "0XFF, 0XFF, 0XFF"),
("X11_ALICE_BLUE", "0xF0, 0xF8, 0xFF"),
("X11_ANTIQUE_WHITE", "0xFA, 0xEB, 0xD7"),
("X11_AQUA", "0x00, 0xFF, 0xFF"),
("X11_AQUAMARINE", "0x7F, 0xFF, 0xD4"),
("X11_AZURE", "0xF0, 0xFF, 0xFF"),
("X11_BEIGE", "0xF5, 0xF5, 0xDC"),