function solveLambaSystem(a, b, c) {

  // the 2d system
  var system = [
    { n: a[0] - c[0], lambda: b[0] },
    { n: a[1] - c[1], lambda: b[1] }
  ];

  // solve
  var n = system[0].n * b[0] + system[1].n * b[1],
      l = system[0].lambda * b[0] + system[1].lambda * b[1];

  return -n / l;
}
Solves a 2D equation system
a + r*b = c, where a,b,c are 2D vectors

@param {Vector} a
@param {Vector} b
@param {Vector} c

@return {number}