RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TConvTypeFactor.FromCommon Method

Converts measurements in the base unit for the conversion family into the units represented by this conversion type.

Pascal
function FromCommon(const AValue: Double): Double; override;
C++
virtual __fastcall Double FromCommon(const Double AValue);

FromCommon provides part of the underlying implementation of the global Convert function. In order to convert a measurement from one set of units to another, Convert calls the ToCommon method of the source conversion type's TConvTypeFactor instance to obtain the measurement in the base units of the conversion family, and then calls the FromCommon method of the destination conversion type's TConvTypeFactor instance to obtain the measurement in the destination units. 

AValue is a value expressed in the base units of the conversion family. 

FromCommon divides AValue by the value of the Factor property and returns the result. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!