This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// when T is any|unknown, Y is returned, otherwise N | |
type IsAnyUnknown<T, Y, N> = unknown extends T ? Y : N; | |
// when T is never, Y is returned, otherwise N | |
type IsNever<T, Y = true, N = false> = [T] extends [never] ? Y : N; | |
// when T is a tuple, Y is returned, otherwise N | |
// valid tuples = [string], [string, boolean], | |
// invalid tuples = [], string[], (string | number)[] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.nio.ByteBuffer; | |
public class Sqrt | |
{ | |
private static float invsqrt0(float x) | |
{ | |
return 1.0f / (float)Math.sqrt( x ); | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Created by Philip Diffenderfer on 10/24/21. | |
// | |
#include <string> | |
#include <map> | |
#include <vector> | |
#include <cmath> | |
#include <functional> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Created by Philip Diffenderfer on 10/24/21. | |
// | |
#include <map> | |
#include <cmath> | |
#include <functional> | |
#include <iostream> | |
template <typename V> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Collection; | |
import java.util.List; | |
import java.util.Random; | |
public class Markov<T> | |
{ | |
protected final MarkovChain<T> root; | |
protected final MarkovChain<T> starters; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<v-app class="panes"> | |
<div class="left"> | |
<v-select | |
label="Type" | |
v-model="type" | |
:items="typeOptions" | |
></v-select> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public abstract class Blend | |
{ | |
public static final Blend Alpha = new Blend() | |
{ | |
public int blend( int o, int n ) | |
{ | |
return Color.mixRGB( o, n, Color.alpha( n ), Color.alpha( o ) ); | |
} | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Arrays; | |
import java.util.Collection; | |
import java.util.Comparator; | |
import java.util.Iterator; | |
public class Array<T> implements Iterable<T> | |
{ | |
public T[] elements; | |
public int size; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class SetOperations | |
{ | |
//=========================================================================== | |
// A set is an immutable group of unique numbers ordered from smallest to | |
// largest. The values in the set must be ordered for all set operations to | |
// function properly, so don't manually change/re-order these! | |
//=========================================================================== | |
class Set { | |
// The ordered set of numbers. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.axe.sandbox.gs; | |
import java.io.InputStream; | |
import java.nio.ByteBuffer; | |
import java.util.HashMap; | |
import java.util.Map; | |
import org.lwjgl.BufferUtils; | |
import org.lwjgl.input.Keyboard; | |
import org.lwjgl.opengl.ARBBufferObject; |
NewerOlder