IMeasureUnitConverter
@objc
public protocol IMeasureUnitConverter
Interface for MeasureUnit converters.
-
Checks if conversion from the specified source MeasureUnit to the specified target MeasureUnit is possible.
Declaration
Swift
func canConvertTo(_ sourceUnit: MeasureUnit, targetUnit: MeasureUnit) -> BoolParameters
sourceUnitThe MeasureUnit to convert from.
targetUnitThe MeasureUnit to convert to.
Return Value
true if the conversion is possible; otherwise false.
-
Checks if conversion of the specified value, bound to the specified axis and with the specified parameter and source MeasureUnit to the specified target MeasureUnit is possible.
Declaration
Swift
func convertTo(_ sourceUnit: MeasureUnit, targetUnit: MeasureUnit, value: Double, axis: Int, param: AnyObject?) -> DoubleParameters
sourceUnitThe MeasureUnit to convert from.
targetUnitThe MeasureUnit to convert to.
valueThe value to convert.
axisThe index of the axis.
paramParamter to use with the conversion.
Return Value
true if the conversion is possible; otherwise false.
-
Checks if conversion from the specified source MeasureUnit to the specified target MeasureUnit is possible.
Declaration
Swift
func canConvertFrom(_ targetUnit: MeasureUnit, sourceUnit: MeasureUnit) -> BoolParameters
sourceUnitThe MeasureUnit to convert from.
targetUnitThe MeasureUnit to convert to.
Return Value
true if the conversion is possible; otherwise false.
-
Checks if conversion from the specified value, bound to the specified axis and with the specified parameter and source MeasureUnit to the specified target MeasureUnit is possible.
Declaration
Swift
func convertFrom(_ targetUnit: MeasureUnit, sourceUnit: MeasureUnit, value: Double, axis: Int, param: AnyObject?) -> DoubleParameters
sourceUnitThe MeasureUnit to convert from.
targetUnitThe MeasureUnit to convert to.
valueThe value to convert.
axisThe index of the axis.
paramParamter to use with the conversion.
Return Value
true if the conversion is possible; otherwise false.
IMeasureUnitConverter Protocol Reference