Logo

Programming-Idioms

History of Idiom 200 > diff from v14 to v15

Edit summary for version 15 by eiko:
New Lua implementation by user [eiko]

Version 14

2020-05-18, 15:07:27

Version 15

2020-10-15, 12:39:07

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.

Variables
h,x,y
Variables
h,x,y
Extra Keywords
pythagore square geometry trigo trigonometry
Extra Keywords
pythagore square geometry trigo trigonometry
Code
local h = math.sqrt(x^2 + y^2)