|
template<template< typename... > typename _resulting_unit, typename _unit_lhs , typename _unit_rhs > |
constexpr auto | cross_unit_divide (const _unit_lhs &lhs, const _unit_rhs &rhs) |
|
template<template< typename... > typename _resulting_unit, typename _unit_lhs , typename _unit_rhs > |
constexpr auto | cross_unit_multiply (const _unit_lhs &lhs, const _unit_rhs &rhs) |
|
template<typename T , std::enable_if_t< std::is_floating_point_v< T >> * = nullptr> |
constexpr bool | eps_equals (const T &lhs, const T &rhs) |
|
template<typename _type , char _symbol, typename _exponent , typename _rhs_type , typename _ratio , std::enable_if_t< std::is_integral_v< _type >> * = nullptr> |
constexpr auto | operator/ (const _type &lhs, const unit_t< _symbol, _exponent, _rhs_type, _ratio > &rhs) |
|
template<typename _target_type , typename _rhs_T > |
constexpr auto | unit_cast (const _rhs_T &rhs) |
| function to cast between two units of the same type More...
|
|
| BUILD_UNIT_FROM_DIVISION (electric_conductance_t, electric_current_t, electric_potential_t) template< typename _type |
|
Namespace containing implementation details for SI.
Namespace containing all SI units.
This file is part of "SI" version 2.5.4 A header only c++ library that provides type safety and user defined literals for handling physical values defined in the International System of Units
https://github.com/bernedom/SI
SPDX-License-Identifier: MIT
template<template< typename... > typename _resulting_unit, typename _unit_lhs , typename _unit_rhs >
constexpr auto SI::detail::cross_unit_divide |
( |
const _unit_lhs & |
lhs, |
|
|
const _unit_rhs & |
rhs |
|
) |
| |
|
constexpr |
divide a value of a certain unit with another value of a possibly different type resulting in a new type, the resulting exponent is specified by resulting unit using a variadic template to simplify usage of implementation the internal type of the result is the internal type of lhs
template<typename _type , char _symbol, typename _exponent , typename _rhs_type , typename _ratio , std::enable_if_t< std::is_integral_v< _type >> * = nullptr>
constexpr auto SI::detail::operator/ |
( |
const _type & |
lhs, |
|
|
const unit_t< _symbol, _exponent, _rhs_type, _ratio > & |
rhs |
|
) |
| |
|
constexpr |
operator to divide scalar type by unit encapsulating the same type template specialization handling integer types @results unit with negative exponent
operator to divide scalar type by unit encapsulating the same type template specialization for floating point types, to avoid possible loss of precision when adjusting for ratio @results unit with negative exponent