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 System.Linq; | |
using System.Runtime.InteropServices; | |
namespace DLLExportLister | |
{ | |
class Program | |
{ | |
// Can't use sizeof for IMAGE_SECTION_HEADER because of unmanaged type | |
public const int SizeOfImageSectionHeader = 40; |
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 Microsoft.CodeAnalysis; | |
using Microsoft.CodeAnalysis.CSharp; | |
using Microsoft.CodeAnalysis.CSharp.Syntax; | |
namespace Roslyn.CodeGeneration | |
{ | |
public class Program | |
{ | |
public static void Main(string[] args) |
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 ExampleGame : Game, IGame | |
{ | |
public Game Game => this; | |
private readonly ISomeDependency _someDependency; | |
public ExampleGame(ISomeDependency someDependency) | |
{ | |
_someDependency = someDependency; | |
} |
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
# RGBW | |
v -0.5 -0.5 -0.5 1.0 0.0 0.0 | |
v -0.5 +0.5 +0.5 0.0 1.0 0.0 | |
v +0.5 -0.5 +0.5 0.0 0.0 1.0 | |
v +0.5 +0.5 -0.5 1.0 1.0 1.0 | |
# CMYK | |
v +0.5 +0.5 +0.5 0.0 1.0 1.0 | |
v +0.5 -0.5 -0.5 1.0 0.0 1.0 | |
v -0.5 +0.5 -0.5 1.0 1.0 0.0 |
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 BitCrusher : MonoBehaviour | |
{ | |
[Range (1f,16f)] | |
public float bits = 16f; | |
[Range (20f,48000f)] | |
public float sampleRate = 48000f; | |
private float phase = 0; | |
private float last = 0; |
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 static class RTEase | |
{ | |
public static Func<float,float> Linear = (t) => { return t; }; | |
public static Func<float,float> Instant = (t) => { return t < 1f ? 0f : 1f;}; | |
public static Func<float,float> QuadIn = (t) => { return t * t; }; | |
public static Func<float,float> QuadOut = (t) => { return 2f*t - t*t;}; | |
public static Func<float,float> QuadInOut = (t) => { return (t <= 0.5f) ? (t*t*2f) : (-1.0f + 4f*t + -2f*t*t);}; | |
public static Func<float,float> CubeIn = (t) => { return t * t * t; }; | |
public static Func<float,float> CubeOut = (t) => { return 1f - CubeIn(1f - t); }; | |
public static Func<float,float> CubeInOut = (t) => { return (t <= 0.5f) ? CubeIn(t * 2f) * 0.5f : CubeOut(t * 2f - 1f) * 0.5f + 0.5f; }; |