Slope function error(sort-of)... again : <p>Well this one feels tough...
<strong>BEFORE YOU READ</strong> 
p5js.org
This is p5.js library</p>

<p>Earlier I made a slope function with some help.</p>

<pre><code>function graphY(num,cHI){
    var GsetR = cHI-num;
    return(GsetR);
};

function slope(x1,y1,x2,y2,ex,direction){
    //direction left or right? mirror flips for right
    var gg1 = x2-x1;
    var gg2 = y2-y1;
    var ggs = gg2/gg1;
    var ggsR = gg1/gg2;
    console.log(ggsR);
    if(direction == "right"){
        return(ggs);
    }
    if(direction == "left"){
        return(-ggs);
    }
};


function setup() {
    createCanvas(1000,650);


}

var slipX= 100;
var slipY= 500;
function draw() {





  background(204);
  fill(0,0,0);
  stroke(0,0,0);
  strokeWeight(2)
  ellipse(slipX,slipY,20,20);
  slipY += slope(100,500,50,200,slipX,"left"); // I WANT THE BALL TO GO TO THE LEFT
  line(100,500,50,200);
  slipX++;
  text(slipY,20,20);



}
</code></pre>

<p>Although it works fine on the "right" mode It doesn't work for left. And this is where the "sort-of bit comes in"</p>

<p>I need the negative RECIPROCAL of ggs not just negative but I checked all documentations and couldn't find out how.
ggsR doesnt work...</p>

<p><strong>Is there any way to get the reciprocal of ggs?</strong></p>
