hypotenuse: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
m (Conversion script moved page hypotenuse to Hypotenuse without leaving a redirect: Converting page title to first-letter uppercase)
No edit summary
 
(One intermediate revision by one other user not shown)
Line 4: Line 4:


|usage=
|usage=
<source lang="mtmacro" line>
<syntaxhighlight lang="mtmacro" line>
[h: h = hypot(sideA, sideB)]
[h: h = hypot(sideA, sideB)]
[h: h = hypotenuse(sideA, sideB)]
[h: h = hypotenuse(sideA, sideB)]
</source>
</syntaxhighlight>




|examples=
|examples=
<source lang="mtmacro" line>
<syntaxhighlight lang="mtmacro" line>
[r: hypot(3,4)]
[r: hypot(3,4)]
</source>
</syntaxhighlight>
Returns 5.
Returns 5.
}}
}}
[[Category:Mathematical Function]]
[[Category:Mathematical Function]]

Latest revision as of 16:22, 15 March 2023

hypotenuse() Function

Returns the hypotenuse of a right triangle whos other two sides have a length of sideA and sideB. The formula used to calculate the hypotnese is, h^2 = sideA^2 * sideB^2. See Hypotenuse

Usage

[h: h = hypot(sideA, sideB)]
[h: h = hypotenuse(sideA, sideB)]

Examples

[r: hypot(3,4)]
Returns 5.