negative reciprocal, easy



Hi,

I have a slope of:

-4
-------
2

I need to get the negative reciprocal of it to find its perpendicular.
If I have a piece of paper and a pencil its easy to draw out the
negative reciprocal line. But I need to make a C++ function out of
this, and I'm not sure when flipping the fraction where if at all to
put the negative/postitive sign, on the new numerator or denominator?

Thanks for any help

.



Relevant Pages

  • Re: coordinate geometry using high school knowledge
    ... a perpendicular and the corresponding base of any triangle, ... How to you tell the slope of a line by ... How are the slopes of two perpendicular lines ... Equipped with those prerequisites, you can ...
    (sci.math.symbolic)
  • Re: coordinate geometry using high school knowledge
    ... a perpendicular and the corresponding base of any triangle, ... Once you know the internal angles, you can find the projection of each ... then solving for their intersection. ...
    (sci.math.symbolic)
  • Re: circumcircle
    ... the three lines that are perpendicular to and which bisect the ... triangle's sides all intersect at the center of the circumcircle. ... slope of the side, you can easily find the slope of the lines ... Now you have a system of three linear equations which you can ...
    (comp.programming)
  • Re: Finding a point on Line Perpendicular to another Line
    ... I have two lines (line1 and line2). ... One is perpendicular the other ... I know the slope of the head of the T which is: ...
    (sci.math)
  • Re: Math Problem
    ... > Given the parabola y=x^2, find two lines perpendicular to one another that are both tangent to this parabola. ... The slope of y = x^2 is negative on the left of the y-axis. ... > And perpendicular lines are nx, ...
    (sci.math)