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
const ZERO = {}; | |
const succ = (p) => ({ p }); | |
const pred = (s) => (s.p); | |
const ONE = succ(ZERO); | |
const THREE = succ(succ(succ(ZERO))); | |
const FIVE = succ(succ(succ(succ(succ(ZERO))))); | |
const equals = (a, b) => { |
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
using System; | |
using UnityEngine; | |
namespace Assets.SunsetIsland.Utilities | |
{ | |
/// <summary> | |
/// Convert between Hilbert index and N-dimensional points. | |
/// The Hilbert index is expressed as an array of transposed bits. | |
/// Example: 5 bits for each of n=3 coordinates. | |
/// 15-bit Hilbert integer = A B C D E F G H I J K L M N O is stored |
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
using System; | |
namespace FizzBuz | |
{ | |
internal class Program | |
{ | |
public static void Main(string[] args) | |
{ | |
var i = 1; | |
Loop: |
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 struct FPMatrix2 | |
{ | |
public FixedPoint A { get; } | |
public FixedPoint B { get; } | |
public FixedPoint C { get; } | |
public FixedPoint D { get; } | |
public FPMatrix2(FixedPoint a, FixedPoint b, FixedPoint c, FixedPoint d) : this() | |
{ | |
A = a; |