I'm in the midst of writing a module in Common Lisp 1 and I need to calculate the distance of a hypothetical line projected perpendicularly from apex of the right angle of (various) triangles to the opposite side.

I'm not the greatest at trig; I can calculate for a given triangle but I don't know the formula to actually bisect a triangle.

In the attached illustration, the distance I am trying to calculate is indicated by the green arrow. (L)

Information that I have:

1) Lengths of sides A, B and C

2) There will always be at least 1 right angle.

Information I can gather if necessary:

a) The two non-right angles.

b) The perimeter

II don't necessarily need any help with the actual code (Unless there's a Lisp function I'm unfamiliar with). What I'm after is the the generic geometric formula that will lead me to the information I'm after.

Any advice for me?

Thanks in advance

---ynotrobits

Triangle.jpg