Skip to content

Commit

Permalink
correct calculation of foot within UomCalculator
Browse files Browse the repository at this point in the history
  • Loading branch information
stephanr committed Nov 11, 2022
1 parent d834146 commit 3a6ca4e
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,9 @@ public final double considerUOM( final double in, final UOM uom ) {
case Pixel:
return in * 0.28 / pixelSize;
case Foot:
// TODO properly convert the res to foot
return in / resolution;
// Note: Use 1 foot as 12 inches => 30,48 cm
// @see http://en.wikipedia.org/wiki/Foot_%28unit%29
return in * 0.3048d / resolution;
case Metre:
return in / resolution;
case mm:
Expand Down

0 comments on commit 3a6ca4e

Please sign in to comment.