/** This file is part of Shapes.
**
** Shapes is free software: you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation, either version 3 of the License, or
** any later version.
**
** Shapes is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with Shapes. If not, see .
**
** Copyright 2015 Henrik Tidefelt
**/
/** This is an encapsulated module. **/
##push ^^
/** === Public interface === **/
/** [hypot x y] gives the length of the hypothenuse of a right-angled triangle with
** catheti x and y.
**/
hypot: -
/** [hypot3D x y z] is the 3D analog of hypot.
**/
hypot3D: hypot3D_impl
/** === End of public interface === **/
/** === Implementation === **/
##push -
hypot: \ x y → [Numeric..Math..sqrt x * x + y * y]
hypot3D_impl: \ x y z → [Numeric..Math..sqrt x * x + y * y + z * z]
##pop -
##pop ^^