function splitBullet(bt) {
  let funcToUse = (a,b) => b;
  switch (Math.floor(Math.random() * 3)) {
    case 0: funcToUse = rot; break;
    case 1: funcToUse = sideways; break;
    case 2: funcToUse = forwards; break;
  }
  badbullets.push(
    new Bullet(
      bt.pos,
      conj(mt(funcToUse(1), inv(bt.pos)), forwards(-0.01))
    ),
    new Bullet(
      bt.pos,
      conj(mt(funcToUse(-1), inv(bt.pos)), forwards(-0.01))
    )
  )
}
// When a first gen bullet hits something.
When a first gen bullet hits something.
When a first gen bullet hits something .
function splitBullet(bt) {
  let funcToUse = (a,b) => b;
  switch (Math.floor(Math.random() * 3)) {
    case 0: funcToUse = rot; break;
    case 1: funcToUse = sideways; break;
    case 2: funcToUse = forwards; break;
  }
  badbullets.push(
    new Bullet(
      bt.pos,
      conj(mt(funcToUse(1), inv(bt.pos)), forwards(-0.01))
    ),
    new Bullet(
      bt.pos,
      conj(mt(funcToUse(-1), inv(bt.pos)), forwards(-0.01))
    )
  )
}
function splitBullet ( bt ) { let funcToUse = ( a , b ) => b ; switch ( Math . floor ( Math . random ( ) * 3 ) ) { case 0 : funcToUse = rot ; break ; case 1 : funcToUse = sideways ; break ; case 2 : funcToUse = forwards ; break ; } badbullets . push ( new Bullet ( bt . pos , conj ( mt ( funcToUse ( 1 ) , inv ( bt . pos ) ) , forwards ( - 0.01 ) ) ) , new Bullet ( bt . pos , conj ( mt ( funcToUse ( - 1 ) , inv ( bt . pos ) ) , forwards ( - 0.01 ) ) ) ) }
When a first gen bullet hits something.
When a first gen bullet hits something .