title: How to check if coordinates are left or right of coordinates with given degrees in javascript?
body: <p>The question title might be a  little confusing, imagine this:</p>
  
  <p><img src="https://i.stack.imgur.com/Wb4GY.png" alt="enter image description here"></p>
  
  <p>In this diagram, I know the postions of points a and b (their x and y values) - the origin though is in the top left corner, so <code>yb</code> for instance is somewhat at 137 and <code>ya</code> 81. Also, I know the degree value of the angle <code>&lt;) a</code> which defines how much the lighter rectangle is rotated (I also know how much the other one is rotated, if that is of use).</p>
  
  <p>So, I want to check if point <code>a</code> is left or right of an imaginary line (axis, the pink line) of point b. How would you do that? I know it's simply maths probably but I'm lost.</p>
  
  <pre><code>var isleft = function(xb,yb, xa, ya, degree) {
      if the point at xa, ya is left from the line starting at point xb, yb using d degrees return true;
  
  };
  </code></pre>
  
  <p>I guess I would have to use a simple linear function to do this, but I dont know how to deal with the degrees, calculate the respective coordinates on that line for a given y value, so help is appreciated.</p>