Right Triangle Calculator-VBForums
Results 1 to 9 of 9

Thread: Right Triangle Calculator

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Sep 2006
    Location
    Egypt
    Posts
    1,689

    Right Triangle Calculator

    This is a sample for "Right Triangle Calculator", i tried to make it as simple as possible.

    I hope it is useful.
    Attached Files Attached Files

  2. #2
    Member
    Join Date
    Feb 2012
    Posts
    56

    Re: Right Triangle Calculator

    Thanks for this 4x2y, it has certainly shown me how to improve on my one, to be honest I don't think you can improve on your one anyway.

    Great stuff.

    Steve

  3. #3
    PowerPoster formlesstree4's Avatar
    Join Date
    Jun 2008
    Location
    On the Internet
    Posts
    3,243

    Re: Right Triangle Calculator

    Code:
    If IsValidInputs() = True Then
        If CalculateAngles() = True Then
            CalculateSides()
        End If
    End If
    This can be reduced to:

    Code:
    If IsValidInputs() AndAlso CalculateAngles() Then CalculateSides()
    You can also reduce some of your If statements to make your code cleaner/less nestled. I haven't tested it, but those are a few things you can do.

  4. #4

    Thread Starter
    Frenzied Member
    Join Date
    Sep 2006
    Location
    Egypt
    Posts
    1,689

    Re: Right Triangle Calculator

    @formlesstree4

    The most important thing for me when i start coding a program is its functionality, when it is work fine and give the correct results, i begun to see how to optimize for speedy and readability. I have posted "Right Triangle Calculator" once i finished and assured it is give the correct results.

  5. #5
    PowerPoster formlesstree4's Avatar
    Join Date
    Jun 2008
    Location
    On the Internet
    Posts
    3,243

    Re: Right Triangle Calculator

    My response was mostly to Steve, who said he didn't see a way it could be optimized. Granted, what I did may not be optimization, more just code compacting, I was not aiming that at you. It does work, and that's what counts. It's a good contribution to the Codebank, so thanks

  6. #6

    Thread Starter
    Frenzied Member
    Join Date
    Sep 2006
    Location
    Egypt
    Posts
    1,689

    Re: Right Triangle Calculator

    SteveHeather has been created much better user interface and more informative alert messages.

    It is worth to check.

  7. #7
    New Member
    Join Date
    Oct 2012
    Posts
    3

    Re: Right Triangle Calculator

    anyone can do a oblique triangle solver?? Or in your attachment can we change the 90 angle and input other angle?

  8. #8

    Thread Starter
    Frenzied Member
    Join Date
    Sep 2006
    Location
    Egypt
    Posts
    1,689

    Re: Right Triangle Calculator

    in your attachment can we change the 90 angle and input other angle?
    No, all calculations are to solve 90 degree triangle.

  9. #9
    New Member
    Join Date
    Oct 2012
    Posts
    3

    Re: Right Triangle Calculator

    2x2y can you make a oblique triangle solver? Please help me. Thanks in advance GODBLESS

Posting Permissions

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



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.