get_scaled_digits


Description:

public int get_scaled_digits (double resolution)

Returns the number of digits a this field should provide to get enough accuracy so that every pixel position shows a different value from neighboring pixels.

Note: when needing digit accuracy to display a diagonal distance, the resolution may not correspond to the unit's horizontal or vertical resolution, but instead to the result of: `distance_in_pixel / distance_in_inch`.

Parameters:

this

The unit you want to know the digits.

resolution

the resolution in PPI.

Returns:

The suggested number of digits.