Logo

Programming-Idioms

History of Idiom 200 > diff from v2 to v3

Edit summary for version 3 by steenslag:
New Ruby implementation by user [steenslag]

Version 2

2019-09-28, 20:37:17

Version 3

2019-09-28, 22:00:41

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
include Math
Code
h = hypot(x, y)