Results 1 to 1 of 1

Thread: F# - Trigonometry - an interactive right triangle

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2003
    Posts
    1,807

    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.
    Last edited by Peter Swinkels; Mar 8th, 2017 at 02:30 PM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width