Logo

Programming-Idioms

History of Idiom 200 > diff from v5 to v6

Edit summary for version 6 by daxim:
New Perl implementation by user [daxim]

Version 5

2019-09-29, 08:44:08

Version 6

2019-09-29, 11:24:18

Idiom #200 Return hypotenuse

Returns the hypotenuse h of the triangle where the sides adjacent to the square angle have lengths x and y.

Idiom #200 Return hypotenuse

Returns the hypotenuse h of the triangle where the sides adjacent to the square angle have lengths x and y.

Extra Keywords
pythagore square geometry trigo trigonometry
Extra Keywords
pythagore square geometry trigo trigonometry
Imports
use Math::AnyNum qw(hypot);
Code
my $h = hypot $x, $y;
Doc URL
http://p3rl.org/Math::AnyNum#hypot