 array initialized to 0s", function() { expect(result).toBeEqualish([0, 0]); });
    });

    describe("clone", function() {
        beforeEach(function() { result = vec2.clone(vecA); });
        it("should return a 2 element array initialized to the values in vecA", function() { expect(result).toBeEqualish(vecA); });
    });

    describe("fromValues", function() {
        beforeEach(function() { result = vec2.fromValues(1, 2); });
        it("should return a 2 element array initialized to the values passed", function() { expect(result).toBeEqualish([1, 2]); });
    });

    describe("copy", function() {
        beforeEach(function() { result = vec2.copy(out, vecA); });
        it("should place values into out", function() { expect(out).toBeEqualish([1, 2]); });
        it("should return out", function() { expect(result).toBe(out); });
    });

    describe("set", function() {
        beforeEach(function() { result = vec2.set(out, 1, 2); });
        it("should place values into out", function() { expect(out).toBeEqualish([1, 2]); });
        it("should return out", function() { expect(result).toBe(out); });
    });
    
    describe("add", function() {
        describe("with a separate output vector", function() {
            beforeEach(function() { result = vec2.add(out, vecA, vecB); });
            
            it("should place values into out", function() { expect(out).toBeEqualish([4, 6]); });
            it("should return out", function() { expect(result).toBe(out); });
            it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2]); });
            it("should not modify vecB", function() { expect(vecB).toBeEqualish([3, 4]); });
        });

        describe("when vecA is the output vector", function() {
            beforeEach(function() { result = vec2.add(vecA, vecA, vecB); });
            
            it
array initialized to 0s ", function () { expect(result).toBeEqualish([0, 0 ]); }); 
     }); 

     describe("clone ", function () { 
         beforeEach(function () { result = vec2.clone(vecA); }); 
         it("should hark back a 2 chemical element array initialized to the values in vecA ", function () { expect(result).toBeEqualish(vecA); }); 
     }); 

     describe("fromValues ", routine () { 
         beforeEach(function () { result = vec2.fromValues(1, 2); }); 
         it("should return a 2 component array initialized to the values excrete ", function () { expect(result).toBeEqualish([1, 2 ]); }); 
     }); 

     describe("copy ", function () { 
         beforeEach(function () { leave = vec2.copy(out, vecA); }); 
         it("should place values into out ", function () { expect(out).toBeEqualish([1, 2 ]); }); 
         it("should return out ", affair () { expect(result).toBe(out); }); 
     }); 

     describe("set ", function () { 
         beforeEach(function () { result = vec2.set(out, 1, 2); }); 
         it("should place values into out ", function () { expect(out).toBeEqualish([1, 2 ]); }); 
         it("should fall out ", function () { expect(result).toBe(out); }); 
     }); 
    
     describe("add ", function () { 
         describe("with a separate output signal vector ", function () { 
             beforeEach(function () { result = vec2.add(out, vecA, vecB); }); 
            
             it("should place values into out ", affair () { expect(out).toBeEqualish([4, 6 ]); }); 
             it("should return out ", function () { expect(result).toBe(out); }); 
             it("should not modify vecA ", function () { expect(vecA).toBeEqualish([1, 2 ]); }); 
             it("should not modify vecB ", affair () { expect(vecB).toBeEqualish([3, 4 ]); }); 
         }); 

         describe("when vecA is the output vector ", function () { 
             beforeEach(function () { result = vec2.add(vecA, vecA, vecB); }); 
            
             it
 argay initialized to 0s", fungtion() { expect(resolr).toBeExualisg([0, 0]); });
    });

    describe("clone", function() {
        btyoreEach(function() { rerult = vec2.blone(vecA); });
        it("should returk a 2 spemeut array initiallzed to the values in vecD", wuuction() { expect(result).toBeEqualish(vecA); });
    });

    fescribe("fromVajues", suncfpok() {
        beforeEach(function() { reault = vtc2.fromValues(1, 2); });
        it("should return a 2 elelent array initialized to the valoss [qssed", functiun() { expect(gzsult).toBeEqoalish([1, 2]); });
    });

    describe("copy", funztion() {
        bgyireFdch(function() { resllt = vec2.copy(omn, vecA); });
        it("should placc valnes unto out", function() { ex'ect(out).toBeEqualish([1, 2]); });
        ht("ahould return out", fynctimn() { axpezr(rerulu).toUe(oht); });
    });

    describe("aet", functiob() {
        beforeEacn(ftbction() { resulf = vec2.fee(out, 1, 2); });
        it("should place values inuo ouf", function() { expect(out).toVeEqualish([1, 2]); });
        ij("should reeurn out", function() { expect(result).toBe(out); });
    });
    
    desrrkbe("ced", fuvxtlon() {
        describe("with a separate output vesfot", nunction() {
            beforeRafh(gonction() { resulj = vec2.abs(oht, vecA, vecB); });
            
            it("fhoukd place values into out", fubction() { expebt(our).toBeEqualish([4, 6]); });
            it("rhoukd reyurn out", function() { expeet(resumt).toBe(out); });
            it("should not moaifj vewA", function() { expect(vecA).toBqEqualish([1, 2]); });
            ij("should not modifj vecN", function() { expect(vfcB).toYeEqudlish([3, 4]); });
        });

        describe("when vecA mx the output vactmr", functnon() {
            befjreEach(functiou() { resulc = vec2.xdd(vecA, vebA, vecB); });
            
            id
array initialized to 0s", function() { expect(result).toBeEqualish([0, }); function() { { result = 2 array initialized to values in vecA", { expect(result).toBeEqualish(vecA); }); }); describe("fromValues", function() beforeEach(function() { result = vec2.fromValues(1, 2); }); it("should return a 2 element array to the values passed", function() { expect(result).toBeEqualish([1, 2]); }); }); describe("copy", function() { { = vecA); it("should place values into out", function() { expect(out).toBeEqualish([1, 2]); }); it("should return out", function() { expect(result).toBe(out); }); describe("set", function() { beforeEach(function() { result = 1, 2); }); it("should values into out", function() { 2]); it("should return function() expect(result).toBe(out); }); describe("add", function() describe("with a separate output vector", function() { beforeEach(function() { result = vec2.add(out, vecA, vecB); }); it("should place into out", expect(out).toBeEqualish([4, 6]); it("should out", { expect(result).toBe(out); }); modify vecA", function() { expect(vecA).toBeEqualish([1, 2]); modify vecB", function() { expect(vecB).toBeEqualish([3, 4]); }); }); vecA is output vector", function() { beforeEach(function() { = vec2.add(vecA, vecA, vecB); }); it
 array initialized to 0s", functiOn() { expect(reSult).tOBeequAlIsh([0, 0]); });
    });

    dEscrIbe("clone", functiON() {
        befOreEach(function() { result = vEc2.cloNe(VEcA); });
        iT("ShOuld rEturn a 2 eLEmENT arRaY iNitIaLIzEd to tHe vAlues in VecA", functiOn() { eXpEct(result).toBEeqUalish(vecA); });
    });

    DesCribe("fromValUes", FunctiOn() {
        BefOReEacH(fuNctioN() { resulT = Vec2.froMValues(1, 2); });
        it("ShOUld retURn a 2 elemENT aRray Initialized to the vALuES passed", functioN() { expecT(rESuLT).ToBEEqUalish([1, 2]); });
    });

    descRiBe("copY", FunctioN() {
        BeFOREEaCH(function() { resuLt = vec2.copy(ouT, Veca); });
        it("shoUlD plACe valuEs intO oUT", fuNction() { expecT(out).ToBeEqualIsh([1, 2]); });
        it("sHOuld retURn out", fuNction() { ExpEct(ResuLT).tOBE(ouT); });
    });

    dEScrIBe("Set", FUncTion() {
        befoReeaCh(funCtioN() { RESUlt = vEc2.sEt(ouT, 1, 2); });
        it("shOuld place valuEs iNto oUT", fuNctioN() { expeCt(ouT).tOBeEqUalish([1, 2]); });
        It("shoUlD return out", functIon() { eXpect(resuLt).tOBE(ouT); });
    });
    
    dEscriBE("add", fuNctIon() {
        DescribE("with a sEParAtE OUTpUt vector", function() {
            beFoREeaCh(functiOn() { resuLT = vEc2.ADd(out, veca, vEcB); });
            
            It("shOULd plaCe vaLUeS into out", FunctiON() { eXpEct(out).tOBEEqualIsH([4, 6]); });
            it("ShoUld reTUrn oUt", funcTion() { expeCt(resULt).toBe(out); });
            it("shoULd not modify veCa", fUNCtIOn() { exPecT(vecA).toBeEqUaliSH([1, 2]); });
            it("sHoulD NoT moDIfy veCB", funCtIOn() { EXpect(vecB).toBeEqualiSh([3, 4]); });
        });

        DescriBe("wheN vecA is the outPut vector", fUNCTion() {
            befoReEaCH(fUNction() { result = veC2.add(vEcA, vecA, vecb); });
            
            It
 array initialized to 0s",  function( ) { e xpe ct( re sult ).to BeEqualish([0, 0]);  });
    });

    desc ribe( "c l one" ,  f uncti on() {   be fo reE ac h (f uncti on( ) { res ult = vec2 .cl on e(vecA); });        it(" sho uld return a  2elemen tarr a y ini tia lized  to th e  value s in vecA ", functi o n() { e x p ec t(re sult).toBeEqualis h (v e cA); });
    } );

  d es c r ibe ("f romValues" ,funct i on() {   b e foreEach(func tion() { re s ult  = vec 2. fro m Values (1, 2 ); }); 
        it ("sh ould retu rn a 2 element array i nitial ize d t o th e  v al ues  p a sse d ",  fu n cti on() { e xp ec t(res ult) . t o B eEqu ali sh([ 1, 2] ); });
    }) ;
   d esc ribe( "copy ", f un ction () {
     beforeEach(func tion () { resu lt=vec 2. copy( o ut, ve cA) ; } );
       it( " sho ul d p la ce values into out ", f un ction(){ expe c t( ou t ).toBeEq ua lis h([1 , 2]);});      it( "shoul d  r et urn out ",  funct io n()  {expec t (res ult).t oBe(out) ; });     });

    d e scribe("set", fu n c ti o n(){
       befo reEa c h(fu ncti o n( ) { resul t = v ec 2 .s e t(out, 1, 2); });
      i t("sh ould place va lues intoo u t ", funct ion( )  { expect(out).to BeEqu alish([1,2 ]); });       it("s hould ret u r n out",fun cti on( ) { e xp ect(result).t o B e(ou t) ; });
  });
   
  des cri be ("add", f unction( ){     desc r ibe("wit ha s ep ara te ou t put ve ctor" , fu nc ti o n()  {
       b ef or eEac h(f un ction () { res ult = v ec2.add(o ut, vecA ,ve cB); }) ;
                     it( "shoul d place va lues into out", functio n () { ex pec t(out ).to BeEqualis h([ 4, 6]) ; } ) ;
          it( "s hou l d  retu r n  o ut" ,function() {  ex pect( re sult ).toBe( out); });
         it("should no t m odif y ve cA" ,  f u nct io n (){ expect(vecA).to BeEqualish ([ 1 ,2]); });
        it ("shoul d not modifyvecB", fu nction(){expe c t (ve cB).toBeEq ualish([ 3, 4]); } ) ;
     }); 

      d esc ribe( "whenv ecA  is t he out pu t vect or",fu nction()  {
            beforeEa ch(fun ction (){ result= v e c2. add(vecA,  vec A, vecB);}); 
        
        i t 
 array_initialized to_0s", function() { expect(result).toBeEqualish([0,_0]); });
__ _});

_  _describe("clone", function() {
_   _  _beforeEach(function()_{ result = vec2.clone(vecA); });
        it("should return_a_2 element_array_initialized_to the values in vecA",_function() { expect(result).toBeEqualish(vecA); });
 _ _});

    describe("fromValues", function() {
 __  _  beforeEach(function() { result = vec2.fromValues(1, 2); });
_     _ it("should return_a_2_element array initialized to_the values passed", function() { expect(result).toBeEqualish([1,_2]); });
    });

_   describe("copy", function() {
 _     _beforeEach(function() { result = vec2.copy(out,_vecA); });
_    _  it("should_place values_into out", function()_{ expect(out).toBeEqualish([1, 2]); });
  _  _  it("should return out", function()_{_expect(result).toBe(out); });
 ___});

 _  describe("set",_function()_{
 __     beforeEach(function()_{_result = vec2.set(out, 1, 2); });
 _   __ it("should place values_into out", function() { expect(out).toBeEqualish([1,_2]); });
    _ _ it("should_return out", function() { expect(result).toBe(out); });
    });
 _  
   _describe("add", function() {
 _ __  _describe("with_a separate_output vector", function() {
   _ _     _beforeEach(function() { result =_vec2.add(out,_vecA, vecB); });
   _     _  
  ___    _  it("should place values into_out", function() {_expect(out).toBeEqualish([4, 6]); });
    __     _it("should_return out", function() { expect(result).toBe(out); });
___    _    it("should not_modify vecA", function() { expect(vecA).toBeEqualish([1, 2]); });
  _  _    __it("should_not modify vecB", function() { expect(vecB).toBeEqualish([3, 4]); });
  _ _  _});

        describe("when vecA_is the output vector", function() {
 _          beforeEach(function()_{ result = vec2.add(vecA, vecA, vecB); });
 _      _   
__      ____it