Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Macro BOOST_UNITS_DEFINE_CONVERSION_FACTOR

BOOST_UNITS_DEFINE_CONVERSION_FACTOR

Synopsis

BOOST_UNITS_DEFINE_CONVERSION_FACTOR(Source, Destination, type_, value_)

Description

Defines the conversion factor from a base unit to any unit or to another base unit with the correct dimensions. Uses of this macro must appear at global scope. If the destination unit is a base unit or a unit that contains only one base unit which is raised to the first power (e.g. feet->meters) the reverse (meters->feet in this example) need not be defined.
定義在正確的量綱下從基礎單位到其它單位或另一個基礎單位之間的轉換比例係數。這個宏必須放在全局範圍內。 如果目的單位是基礎單位或只包含一個基礎單位能提升到第一等級的單位(例如feet->meters),相對應的轉換(meters->feet)是不需要再定義的


PrevUpHomeNext