Skip to content

Instantly share code, notes, and snippets.

(function() {
'use strict';
var FLOAT_VIEW = new Float32Array( 1 ),
INT_VIEW = new Uint32Array( FLOAT_VIEW.buffer ),
rsqrt = function( number ) {
var x2 = 0.5 * number;
FLOAT_VIEW[0] = number;
INT_VIEW[0] = 0x5f3759df - ( INT_VIEW[0] >>> 1 );
<?php
/**
* Not truely a visitor pattern as no accept() methods are being implemented; in this case
* there's just no need to complicate things
*/
interface VisitorPattern
{
static public function visit(&$element);
}