This file contains hidden or 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
| class Metric { | |
| static function main() { | |
| var coinRadius:Millimeters = 12; | |
| var myHeight:Centimeters = 180; | |
| var raceLength:Meters = 200; | |
| var commuteDistance:Kilometers = 23; | |
| diff( coinRadius, myHeight ); // 1.788 meters | |
| diff( raceLength, commuteDistance ); // 22800 meters | |
| sum( commuteDistance, coinRadius ); // 23000.012 meters |
This file contains hidden or 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
| // Modified version of a tilt shift shader from Martin Jonasson (http://grapefrukt.com/) | |
| // Read http://notes.underscorediscovery.com/ for context on shaders and this file | |
| // License : MIT | |
| uniform sampler2D tex0; | |
| varying vec2 tcoord; | |
| varying vec4 color; | |
| /* | |
| Take note that blurring in a single pass (the two for loops below) is more expensive than separating |
This file contains hidden or 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 haxe.macro.Expr; | |
| class FTW | |
| { | |
| public static function build() | |
| { | |
| return haxe.macro.Context.getBuildFields().map(transformField); | |
| } | |
| static function transformField(field:Field) |
This file contains hidden or 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
| class Main { | |
| static function main() { | |
| MyMacro.testReify(); | |
| } | |
| } |
This file contains hidden or 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
| class JQ | |
| { | |
| static public inline function select(j:js.Dom.HtmlDom):js.JQuery | |
| { | |
| return new js.JQuery(j); | |
| } | |
| static public inline function query(j:String):js.JQuery | |
| { | |
| return new js.JQuery(j); |
NewerOlder