File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
tests/PhpWord/Tests/Shared Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -108,7 +108,7 @@ public static function angleToDegrees($value = 0)
108
108
*/
109
109
public static function pixelsToCentimeters ($ value = 0 )
110
110
{
111
- return $ value * 0.028 ;
111
+ return $ value * 0.026458333 ;
112
112
}
113
113
114
114
/**
@@ -120,7 +120,7 @@ public static function pixelsToCentimeters($value = 0)
120
120
public static function centimetersToPixels ($ value = 0 )
121
121
{
122
122
if ($ value != 0 ) {
123
- return $ value / 0.028 ;
123
+ return $ value / 0.026458333 ;
124
124
} else {
125
125
return 0 ;
126
126
}
Original file line number Diff line number Diff line change @@ -56,10 +56,10 @@ public function testUnitConversions()
56
56
$ this ->assertEquals (round ($ value / 60000 ), $ result );
57
57
58
58
$ result = Drawing::pixelsToCentimeters ($ value );
59
- $ this ->assertEquals ($ value * 0.028 , $ result );
59
+ $ this ->assertEquals ($ value * 0.026458333 , $ result );
60
60
61
61
$ result = Drawing::centimetersToPixels ($ value );
62
- $ this ->assertEquals ($ value / 0.028 , $ result );
62
+ $ this ->assertEquals ($ value / 0.026458333 , $ result );
63
63
}
64
64
}
65
65
You can’t perform that action at this time.
0 commit comments