title: Vectors to grid of points - PHP
body: <p><img src="https://i.stack.imgur.com/cbaFJ.jpg" alt="Vector"></p>
  
  <p>Points A and B got timestamps <code>$tA</code>, <code>$tB</code> and positions: <code>($xA,$yA)</code> and <code>($xB,$yB)</code>... What I need to do, is to convert that vector to grid of points of given size of grid field  - <code>$size</code> and to assign those poits proper times depending of what part of vector actually touches certain grid field.</p>
  
  <p>Any way to do this fast?</p>