Skip to content

Commit 2dce3f2

Browse files
authored
Fix the conversion error while converting mm to px (#11)
Example: `auto x = 5.mm` was converted to `0`, now it is fixed to convert to a float value. Signed-off-by: Aravinda VK <vkaravinda7@gmail.com>
1 parent 61dea64 commit 2dce3f2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/chitra/helpers.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ double cm(T)(T value)
1717

1818
double mm(T)(T value)
1919
{
20-
return (value / 10).cm;
20+
return (value / 10.0).cm;
2121
}
2222

2323
// 1 pt = 1/72 of inch and 1 px = 1/96 of inch

0 commit comments

Comments
 (0)