ToPositiveFloat() Method (Fix32)
Returns a positive float value that represents the current object.
'Declaration
Public Function ToPositiveFloat() As Single
public float ToPositiveFloat()
public: float ToPositiveFloat()
public:
float ToPositiveFloat()
Return Value
A positive float value because method interprets the
Whole property as UInt16 value.
TWAIN specification specifies that resolution must be a positive value. Also specification specifies that resolution value is stored in Fix32 value and this means that resolution value cannot be greater than Int16.MaxValue (32767) because the Whole property has UInt16 type. Sometimes resolution can be greater than 32767 if resolution is specified in Points or Twips.
This method must be used if you know that this object represents the positive value, for example, for getting correct value of resolution.
Target Platforms: .NET 9; .NET 8; .NET 7; .NET 6; .NET Framework 4.8, 4.7, 4.6, 4.5, 4.0, 3.5