qtty-cpp 0.4.5
Header-only C++ wrapper for qtty
Loading...
Searching...
No Matches
inductance.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSD-3-Clause
2// Copyright (C) 2026 Vallés Puig, Ramon
3
4#pragma once
5
6#include "../ffi_core.hpp"
7
8namespace qtty {
9
10struct HenryTag {};
11struct MicrohenryTag {};
12struct MillihenryTag {};
13
14template <> struct UnitTraits<HenryTag> {
15 static constexpr UnitId unit_id() { return UNIT_ID_HENRY; }
16 static constexpr std::string_view symbol() { return "H"; }
17 static constexpr DimensionId dimension() { return DIMENSION_ID_INDUCTANCE; }
18};
19template <> struct UnitTraits<MicrohenryTag> {
20 static constexpr UnitId unit_id() { return UNIT_ID_MICROHENRY; }
21 static constexpr std::string_view symbol() { return "µH"; }
22 static constexpr DimensionId dimension() { return DIMENSION_ID_INDUCTANCE; }
23};
24template <> struct UnitTraits<MillihenryTag> {
25 static constexpr UnitId unit_id() { return UNIT_ID_MILLIHENRY; }
26 static constexpr std::string_view symbol() { return "mH"; }
27 static constexpr DimensionId dimension() { return DIMENSION_ID_INDUCTANCE; }
28};
29
33
34} // namespace qtty
constexpr bool is_angular_v
Definition angles.hpp:49
static constexpr DimensionId dimension()
static constexpr UnitId unit_id()
static constexpr std::string_view symbol()
static constexpr std::string_view symbol()
static constexpr DimensionId dimension()
static constexpr UnitId unit_id()
static constexpr std::string_view symbol()
static constexpr UnitId unit_id()
static constexpr DimensionId dimension()