Skip to content

Instantly share code, notes, and snippets.

View vincent64's full-sized avatar
🍫
I breathe recursion emitted by trees.

Vincent P. vincent64

🍫
I breathe recursion emitted by trees.
View GitHub Profile
@mtsamis
mtsamis / SIMD_AABB.md
Created November 21, 2023 16:37
An optimized representation for 2D AABBs and SIMD intrinsics

(Note: This writeup assumes some knowledge of SIMD programming, assembly and AABBs).

Introduction

There are a couple of ways to represent an axis aligned bounding box in 2D, but I think the most common is to store the minimum and maximum coordinates. With this approach, most basic operations (overlap tests, union/intersection, etc.) have simple implementations and offer decent performance.

Some time ago, I came up with a modification to this AABB representation that has the potential for better performance. I haven't seen this technique mentioned or used anywhere, but if you have seen it somehow I would appreciate it if you could let me know.

@BurakDizlek
BurakDizlek / CountryFlags.java
Last active December 31, 2024 00:23
Get to flag unicode as String and use it anywhere.
public class CountryFlags {
private static String A = getEmojiByUnicode(0x1F1E6);
private static String B = getEmojiByUnicode(0x1F1E7);
private static String C = getEmojiByUnicode(0x1F1E8);
private static String D = getEmojiByUnicode(0x1F1E9);
private static String E = getEmojiByUnicode(0x1F1EA);
private static String F = getEmojiByUnicode(0x1F1EB);
private static String G = getEmojiByUnicode(0x1F1EC);
private static String H = getEmojiByUnicode(0x1F1ED);
private static String I = getEmojiByUnicode(0x1F1EE);
@DamianSuess
DamianSuess / SpecialFolderLocations.md
Last active August 12, 2026 05:48
C# Environment.SpecialFolder
@gkhays
gkhays / DrawSineWave.html
Last active January 21, 2026 21:36
Oscillating sine wave, including the steps to figuring out how to plot a sine wave
<!DOCTYPE html>
<html>
<head>
<title>Sine Wave</title>
<script type="text/javascript">
function showAxes(ctx,axes) {
var width = ctx.canvas.width;
var height = ctx.canvas.height;
var xMin = 0;