Table of Contents

Method MmToInches

Namespace
Alternet.Drawing.Printing
Assembly
Alternet.UI.Common.dll

MmToInches(float, int)

Converts a measurement from millimeters to inches and rounds the result to the specified number of decimal places.

public static float MmToInches(float mm, int decimals)

Parameters

mm float

The measurement in millimeters to convert.

decimals int

The number of decimal places to which the result is rounded. Defaults to 2 if not specified.

Returns

float

The equivalent measurement in inches, rounded to the specified number of decimal places.

Remarks

Uses a conversion factor of 25.4 millimeters per inch.

MmToInches(float)

Converts a measurement from millimeters to the equivalent value in inches.

public static float MmToInches(float mm)

Parameters

mm float

The length in millimeters to convert. Must be a non-negative value.

Returns

float

The corresponding length in inches as a single-precision floating-point number.

Remarks

This method uses a conversion factor of 25.4 millimeters per inch. Supplying a negative value for the parameter may result in an invalid conversion.