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; | |
/** | |
* Xorshift preudorandom number generator for Haxe. | |
* Reference: http://en.wikipedia.org/wiki/Xorshift | |
*/ | |
class Xorshift | |
{ | |
inline public static var INT_MAX:Int = 0x7FFFFFFF; // (2^31 - 1) | |
inline public static var INT_MAXPLUSONE:Float = 2147483648.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
using System.Threading; | |
using UnityEngine; | |
// [ExecuteInEditMode] | |
public class InputTest : MonoBehaviour | |
{ | |
private float _delay; | |
private float _fps; | |
private float _fpsTime; |
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
private void Start() | |
{ | |
_mousePositions = new Vector2[TimeFliesLikeAnArrow.Length]; | |
for (var i = 0; i < _mousePositions.Length; i++) | |
{ | |
var ii = i; | |
_subscriptions.Add( | |
// Magic happens here: | |
RxHost.Instance.GUIEvents | |
.Where(e => e.type == EventType.mouseMove) |
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
[[ | |
01234567890123456789012345678901234567890123456789012345678901234567890123456789 | |
]] | |
-- NOTE: requires 'LPEG' module | |
local re = require're' | |
local assert = assert | |
local min, max = math.min, math.max | |
-- PEG Grammar 1: |
NewerOlder