Convert a single coordinate or dimension from 'units' to inches. For example, if your units are 'points' (72 points = 1 inch), then units_per_inch=72. If your units are 'pixels' at 96 DPI, then units_per_inch=96.
(value_in_units, units_per_inch=72)
| 469 | |
| 470 | |
| 471 | def to_inches(value_in_units, units_per_inch=72): |
| 472 | """ |
| 473 | Convert a single coordinate or dimension from 'units' to inches. |
| 474 | For example, if your units are 'points' (72 points = 1 inch), |
| 475 | then units_per_inch=72. |
| 476 | If your units are 'pixels' at 96 DPI, then units_per_inch=96. |
| 477 | """ |
| 478 | return value_in_units / units_per_inch |
| 479 | |
| 480 | |
| 481 | def from_inches(value_in_inches, units_per_inch=72): |
no outgoing calls
no test coverage detected