Skip to main content

c/
math_hypot.rs

1// Copyright (c) 2026 Meng Zhuo
2// SPDX-License-Identifier: BSD-3-Clause
3
4// hypot entry points backed by the libm crate.
5
6#[no_mangle]
7pub extern "C" fn hypot(x: f64, y: f64) -> f64 {
8    libm::hypot(x, y)
9}
10
11#[no_mangle]
12pub extern "C" fn hypotf(x: f32, y: f32) -> f32 {
13    libm::hypotf(x, y)
14}