Skip to content

Instantly share code, notes, and snippets.

View ice1000's full-sized avatar
♾️
Generalizing something

Tesla Zhang‮ ice1000

♾️
Generalizing something
View GitHub Profile
{-# LANGUAGE LambdaCase #-}
data Term
= TmVar Integer
| TmAbs String Term
| TmApp Term Term
deriving (Show, Eq)
termShift :: Integer -> Term -> Term
termShift d = walk 0
@ice1000
ice1000 / ImRotateDemo.cpp
Last active July 29, 2018 19:28 — forked from carasuca/ImRotateDemo.cpp
Rotating text and icon demo for dear imgui
#include "imgui_internal.h"
int rotation_start_index;
auto ImRotateStart() -> void {
rotation_start_index = ImGui::GetWindowDrawList()->VtxBuffer.Size;
}
auto ImRotationCenter() -> ImVec2 {
ImVec2 l{FLT_MAX, FLT_MAX}, u{-FLT_MAX, -FLT_MAX}; // bounds