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 FPSCounter extends TextField | |
| { | |
| public var currentFPS (default, null):Float; | |
| private var cacheCount:Int; | |
| private var times:Array <Float>; | |
| private var lastUIUpdate:Float; | |
| public function new(x:Float = 10, y:Float = 10, color:Int = 0x000000, fontSize:Int=24) { |
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.Int64; | |
| class Int64Utils | |
| { | |
| private inline static var MAX_32_PRECISION = 4294967296; | |
| public static function fromFloat(f:Float):Int64 { | |
| return Int64.make(Std.int(f/MAX_32_PRECISION), Std.int(f-(f/MAX_32_PRECISION))); | |
| } |
OlderNewer