ReUseX  0.0.1
3D Point Cloud Processing for Building Reuse
Loading...
Searching...
No Matches
math.hpp
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2025 Povl Filip Sonne-Frederiksen
2//
3// SPDX-License-Identifier: GPL-3.0-or-later
4
5#pragma once
6
7namespace ReUseX::utils {
8template <typename T>
9inline T remap(const T value, const T min_in, const T max_in,
10 const T min_out = T(0), T max_out = T(1)) {
11 return (value - min_in) / (max_in - min_in) * (max_out - min_out) + min_out;
12}
13} // namespace ReUseX::utils
T remap(const T value, const T min_in, const T max_in, const T min_out=T(0), T max_out=T(1))
Definition math.hpp:9