|
qtty-cpp 0.4.5
Header-only C++ wrapper for qtty
|
Dimension-aware math helpers mirroring the Rust Quantity API.
More...
#include <cmath>#include <type_traits>#include "units/angular.hpp"#include "units/dimensionless.hpp"

Go to the source code of this file.
Namespaces | |
| namespace | qtty |
Dimension-aware math helpers mirroring the Rust Quantity API.
These mirror the Rust methods that change the dimension of the result and therefore cannot live as plain members of Quantity (which is unit-tag agnostic). They are provided as free functions:
Rust C++ q.ratio_to(other) qtty::ratio_to(q, other) q.exp() qtty::exp(q) q.ln() qtty::ln(q) q.powi(n) qtty::powi(q, n) q.powf(exp) qtty::powf(q, exp) q.sin() qtty::sin(q) q.cos() qtty::cos(q) q.tan() qtty::tan(q) q.asin_angle() qtty::asin_angle(q) q.acos_angle() qtty::acos_angle(q) q.atan_angle() qtty::atan_angle(q)
The transcendental helpers are constrained to dimensionless inputs, matching the Rust trait bounds (U: Unit<Dim = Dimensionless>).
Definition in file math.hpp.