F# - Trigonometry - an interactive right triangle
This is another F# conversion of a program I wrote earlier. This time it's a simple form based application instead of a console application, and it heavily depends on imperative style code instead of functional code. Any way, it does demonstrate how a form based application can be made in F#.
Usage:
The attached program displays a simple grid in which - when the user click inside it - a right triangle with the hypotenuse at a specific angle is generated. Where exactly the user clicks determines where the triangle's hypotenuse and opposite sides meet. This in turn determines the hypotenuse's angle. The program then uses the difference in length of the triangle's sides to calculate the sine, cosine, and tangent (not through the System.Math functions, although they are used in a few places.)
This program is a vb.net to F# conversion of http://www.vbforums.com/showthread.p...97#post4959597.