build/module/lib/math/Geometric2.js
/**
 * Promotes an unknown value to a Geometric2, or returns undefined.
 * @hidden
 */
Promotes an unknown value to a Geometric2, or returns undefined.
@hidden
Promotes an unknown value to a Geometric2 or returns undefined . @hidden
function duckCopy(value) {
    if (isObject(value)) {
        var m = value;
        if (isNumber(m.x) && isNumber(m.y)) {
            if (isNumber(m.a) && isNumber(m.b)) {
                console.warn("Copying GeometricE2 to Geometric2");
                return Geometric2.copy(m);
            }
            else {
                console.warn("Copying VectorE2 to Geometric2");
                return Geometric2.fromVector(m);
            }
        }
        else {
            if (isNumber(m.a) && isNumber(m.b)) {
                console.warn("Copying SpinorE2 to Geometric2");
                return Geometric2.fromSpinor(m);
            }
            else {
                return void 0;
            }
        }
    }
    else {
        return void 0;
    }
}
function duckCopy ( value ) { if ( isObject ( value ) ) { var m = value ; if ( isNumber ( m . x ) && isNumber ( m . y ) ) { if ( isNumber ( m . a ) && isNumber ( m . b ) ) { console . warn ( "Copying GeometricE2 to Geometric2" ) ; return Geometric2 . copy ( m ) ; } else { console . warn ( "Copying VectorE2 to Geometric2" ) ; return Geometric2 . fromVector ( m ) ; } } else { if ( isNumber ( m . a ) && isNumber ( m . b ) ) { console . warn ( "Copying SpinorE2 to Geometric2" ) ; return Geometric2 . fromSpinor ( m ) ; } else { return void 0 ; } } } else { return void 0 ; } }
Promotes an unknown value to a Geometric2, or returns undefined.
Promotes an unknown value to a Geometric2 or returns undefined .