1. ## 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.

2. ## 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. ## 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. ## 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. ## 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. ## Re: Right Triangle Calculator

It is worth to check.

7. ## 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. ## 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. ## Re: Right Triangle Calculator

#### 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