math.hypot

From Minetest Developer Wiki
Jump to: navigation, search

Syntax

math.hypot(x, y)

Description

Gets the hypotenuse of a triangle with legs x and y. Equivalent to math.sqrt(x^2+y^2). Useful for distance calculations in 2D.

Personal tools
Namespaces

Variants
Actions
Navigation
API
Toolbox