|
quanta 0.1.0
Type-safe units for temperature, frequency, electrical and spatial quantities, modeled after std::chrono
|
Standard integer-based types using int64_t representation. More...
Typedefs | |
| template<typename Rep , typename Precision = std::ratio<1>> | |
| using | quanta::spatial::length = quantity< meter_unit, Rep, Precision > |
| Length quantity with configurable representation and precision. | |
| using | quanta::spatial::nanometers = length< int64_t, std::nano > |
| Length with 1 nm precision. | |
| using | quanta::spatial::micrometers = length< int64_t, std::micro > |
| Length with 1 µm precision. | |
| using | quanta::spatial::millimeters = length< int64_t, std::milli > |
| Length with 1 mm precision. | |
| using | quanta::spatial::centimeters = length< int64_t, std::centi > |
| Length with 1 cm precision. | |
| using | quanta::spatial::meters = length< int64_t > |
| Length with 1 m precision. | |
| using | quanta::spatial::kilometers = length< int64_t, std::kilo > |
| Length with 1 km precision. | |
| using | quanta::spatial::mils = length< int64_t, std::ratio< 127, 5000000 > > |
| Length with 1 mil (thou, 1/1000 in = 25.4 µm) precision. | |
| using | quanta::spatial::inches = length< int64_t, std::ratio< 127, 5000 > > |
| Length with 1 in (25.4 mm) precision. | |
| using | quanta::spatial::feet = length< int64_t, std::ratio< 381, 1250 > > |
| Length with 1 ft (12 in = 0.3048 m) precision. | |
| using | quanta::spatial::yards = length< int64_t, std::ratio< 1143, 1250 > > |
| Length with 1 yd (3 ft = 0.9144 m) precision. | |
| using | quanta::spatial::miles = length< int64_t, std::ratio< 201168, 125 > > |
| Length with 1 mi (5280 ft = 1609.344 m) precision. | |
| using | quanta::spatial::nautical_miles = length< int64_t, std::ratio< 1852 > > |
| Length with 1 nmi (1852 m) precision. | |
| template<typename Rep , typename Precision = std::ratio<1>> | |
| using | quanta::spatial::area = quantity< square_meter_unit, Rep, Precision > |
| Area quantity with configurable representation and precision (a ratio of one m²). | |
| using | quanta::spatial::square_millimeters = area< int64_t, std::micro > |
| Area with 1 mm² precision. | |
| using | quanta::spatial::square_centimeters = area< int64_t, std::ratio< 1, 10000 > > |
| Area with 1 cm² precision. | |
| using | quanta::spatial::square_meters = area< int64_t > |
| Area with 1 m² precision. | |
| using | quanta::spatial::hectares = area< int64_t, std::ratio< 10000 > > |
| Area with 1 ha (1 hm² = 10,000 m²) precision. | |
| using | quanta::spatial::square_kilometers = area< int64_t, std::mega > |
| Area with 1 km² precision. | |
| using | quanta::spatial::square_inches = area< int64_t, std::ratio< 16129, 25000000 > > |
| Area with 1 in² (645.16 mm²) precision. | |
| using | quanta::spatial::square_feet = area< int64_t, std::ratio< 145161, 1562500 > > |
| Area with 1 ft² (144 in² = 0.09290304 m²) precision. | |
| using | quanta::spatial::square_yards = area< int64_t, std::ratio< 1306449, 1562500 > > |
| Area with 1 yd² (9 ft² = 0.83612736 m²) precision. | |
| using | quanta::spatial::acres = area< int64_t, std::ratio< 316160658, 78125 > > |
| Area with 1 acre (43,560 ft² = 4046.8564224 m²) precision. | |
| using | quanta::spatial::square_miles = area< int64_t, std::ratio< 40468564224, 15625 > > |
| Area with 1 mi² (640 acres = 2,589,988.110336 m²) precision. | |
| template<typename Rep , typename Precision = std::ratio<1>> | |
| using | quanta::spatial::volume = quantity< cubic_meter_unit, Rep, Precision > |
| Volume quantity with configurable representation and precision (a ratio of one m³). | |
| using | quanta::spatial::microliters = volume< int64_t, std::nano > |
| Volume with 1 µL (1 mm³) precision. | |
| using | quanta::spatial::cubic_millimeters = microliters |
| Volume with 1 mm³ precision (the same type as microliters). | |
| using | quanta::spatial::milliliters = volume< int64_t, std::micro > |
| Volume with 1 mL (1 cm³) precision. | |
| using | quanta::spatial::cubic_centimeters = milliliters |
| Volume with 1 cm³ precision (the same type as milliliters). | |
| using | quanta::spatial::liters = volume< int64_t, std::milli > |
| Volume with 1 L (1 dm³) precision. | |
| using | quanta::spatial::cubic_meters = volume< int64_t > |
| Volume with 1 m³ precision. | |
| using | quanta::spatial::cubic_inches = volume< int64_t, std::ratio< 2048383, 125000000000 > > |
| Volume with 1 in³ (16.387064 mL) precision. | |
| using | quanta::spatial::cubic_feet = volume< int64_t, std::ratio< 55306341, 1953125000 > > |
| Volume with 1 ft³ (1728 in³ = 28.316846592 L) precision. | |
| using | quanta::spatial::cubic_yards = volume< int64_t, std::ratio< 1493271207, 1953125000 > > |
| Volume with 1 yd³ (27 ft³ = 0.764554857984 m³) precision. | |
| using | quanta::spatial::us_gallons = volume< int64_t, std::ratio< 473176473, 125000000000 > > |
| Volume with 1 US gallon (231 in³ = 3.785411784 L) precision. | |
Standard integer-based types using int64_t representation.
For floating-point representations, use the alias templates, e.g. length<double>, length<double, std::milli> or volume<double, std::milli>.
Imperial and nautical precisions are exact ratios of one meter, from the international definitions: 1 in = 25.4 mm, 1 ft = 12 in, 1 yd = 3 ft, 1 mi = 5280 ft, 1 mil = 1/1000 in and 1 nmi = 1852 m. Area and volume precisions are exact ratios of one square or cubic meter: the squares and cubes of the length precisions, plus 1 ha = 1 hm², 1 acre = 43560 ft², 1 L = 1 dm³ and 1 US gallon = 231 in³.
| using quanta::spatial::acres = typedef area<int64_t, std::ratio<316160658, 78125> > |
Area with 1 acre (43,560 ft² = 4046.8564224 m²) precision.
Definition at line 770 of file spatial.hpp.
| using quanta::spatial::area = typedef quantity<square_meter_unit, Rep, Precision> |
Area quantity with configurable representation and precision (a ratio of one m²).
Definition at line 750 of file spatial.hpp.
| using quanta::spatial::centimeters = typedef length<int64_t, std::centi> |
Length with 1 cm precision.
Definition at line 729 of file spatial.hpp.
| using quanta::spatial::cubic_centimeters = typedef milliliters |
Volume with 1 cm³ precision (the same type as milliliters).
Definition at line 785 of file spatial.hpp.
| using quanta::spatial::cubic_feet = typedef volume<int64_t, std::ratio<55306341, 1953125000> > |
Volume with 1 ft³ (1728 in³ = 28.316846592 L) precision.
Definition at line 794 of file spatial.hpp.
| using quanta::spatial::cubic_inches = typedef volume<int64_t, std::ratio<2048383, 125000000000> > |
Volume with 1 in³ (16.387064 mL) precision.
Definition at line 792 of file spatial.hpp.
| using quanta::spatial::cubic_meters = typedef volume<int64_t> |
Volume with 1 m³ precision.
Definition at line 789 of file spatial.hpp.
| using quanta::spatial::cubic_millimeters = typedef microliters |
Volume with 1 mm³ precision (the same type as microliters).
Definition at line 781 of file spatial.hpp.
| using quanta::spatial::cubic_yards = typedef volume<int64_t, std::ratio<1493271207, 1953125000> > |
Volume with 1 yd³ (27 ft³ = 0.764554857984 m³) precision.
Definition at line 796 of file spatial.hpp.
| using quanta::spatial::feet = typedef length<int64_t, std::ratio<381, 1250> > |
Length with 1 ft (12 in = 0.3048 m) precision.
Definition at line 740 of file spatial.hpp.
| using quanta::spatial::hectares = typedef area<int64_t, std::ratio<10000> > |
Area with 1 ha (1 hm² = 10,000 m²) precision.
Definition at line 759 of file spatial.hpp.
| using quanta::spatial::inches = typedef length<int64_t, std::ratio<127, 5000> > |
Length with 1 in (25.4 mm) precision.
Definition at line 738 of file spatial.hpp.
| using quanta::spatial::kilometers = typedef length<int64_t, std::kilo> |
Length with 1 km precision.
Definition at line 733 of file spatial.hpp.
| using quanta::spatial::length = typedef quantity<meter_unit, Rep, Precision> |
Length quantity with configurable representation and precision.
Definition at line 720 of file spatial.hpp.
| using quanta::spatial::liters = typedef volume<int64_t, std::milli> |
Volume with 1 L (1 dm³) precision.
Definition at line 787 of file spatial.hpp.
| using quanta::spatial::meters = typedef length<int64_t> |
Length with 1 m precision.
Definition at line 731 of file spatial.hpp.
| using quanta::spatial::microliters = typedef volume<int64_t, std::nano> |
Volume with 1 µL (1 mm³) precision.
Definition at line 779 of file spatial.hpp.
| using quanta::spatial::micrometers = typedef length<int64_t, std::micro> |
Length with 1 µm precision.
Definition at line 725 of file spatial.hpp.
| using quanta::spatial::miles = typedef length<int64_t, std::ratio<201168, 125> > |
Length with 1 mi (5280 ft = 1609.344 m) precision.
Definition at line 744 of file spatial.hpp.
| using quanta::spatial::milliliters = typedef volume<int64_t, std::micro> |
Volume with 1 mL (1 cm³) precision.
Definition at line 783 of file spatial.hpp.
| using quanta::spatial::millimeters = typedef length<int64_t, std::milli> |
Length with 1 mm precision.
Definition at line 727 of file spatial.hpp.
| using quanta::spatial::mils = typedef length<int64_t, std::ratio<127, 5000000> > |
Length with 1 mil (thou, 1/1000 in = 25.4 µm) precision.
Definition at line 736 of file spatial.hpp.
| using quanta::spatial::nanometers = typedef length<int64_t, std::nano> |
Length with 1 nm precision.
Definition at line 723 of file spatial.hpp.
| using quanta::spatial::nautical_miles = typedef length<int64_t, std::ratio<1852> > |
Length with 1 nmi (1852 m) precision.
Definition at line 746 of file spatial.hpp.
| using quanta::spatial::square_centimeters = typedef area<int64_t, std::ratio<1, 10000> > |
Area with 1 cm² precision.
Definition at line 755 of file spatial.hpp.
| using quanta::spatial::square_feet = typedef area<int64_t, std::ratio<145161, 1562500> > |
Area with 1 ft² (144 in² = 0.09290304 m²) precision.
Definition at line 766 of file spatial.hpp.
| using quanta::spatial::square_inches = typedef area<int64_t, std::ratio<16129, 25000000> > |
Area with 1 in² (645.16 mm²) precision.
Definition at line 764 of file spatial.hpp.
| using quanta::spatial::square_kilometers = typedef area<int64_t, std::mega> |
Area with 1 km² precision.
Definition at line 761 of file spatial.hpp.
| using quanta::spatial::square_meters = typedef area<int64_t> |
Area with 1 m² precision.
Definition at line 757 of file spatial.hpp.
| using quanta::spatial::square_miles = typedef area<int64_t, std::ratio<40468564224, 15625> > |
Area with 1 mi² (640 acres = 2,589,988.110336 m²) precision.
Definition at line 772 of file spatial.hpp.
| using quanta::spatial::square_millimeters = typedef area<int64_t, std::micro> |
Area with 1 mm² precision.
Definition at line 753 of file spatial.hpp.
| using quanta::spatial::square_yards = typedef area<int64_t, std::ratio<1306449, 1562500> > |
Area with 1 yd² (9 ft² = 0.83612736 m²) precision.
Definition at line 768 of file spatial.hpp.
| using quanta::spatial::us_gallons = typedef volume<int64_t, std::ratio<473176473, 125000000000> > |
Volume with 1 US gallon (231 in³ = 3.785411784 L) precision.
Definition at line 798 of file spatial.hpp.
| using quanta::spatial::volume = typedef quantity<cubic_meter_unit, Rep, Precision> |
Volume quantity with configurable representation and precision (a ratio of one m³).
Definition at line 776 of file spatial.hpp.
| using quanta::spatial::yards = typedef length<int64_t, std::ratio<1143, 1250> > |
Length with 1 yd (3 ft = 0.9144 m) precision.
Definition at line 742 of file spatial.hpp.