Skip to content

Commit

Permalink
* [android] Use rint on getFloatByViewport.
Browse files Browse the repository at this point in the history
  • Loading branch information
miomin authored and YorkShen committed Jul 26, 2018
1 parent 34d7528 commit 4bffbd2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion weex_core/Source/base/ViewUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ namespace WeexCore {

float realPx = (src * WXCoreEnvironment::getInstance()->DeviceWidth() /
viewport);
float result = realPx > 0.005 && realPx < 1 ? 1.0f : realPx;
float result = realPx > 0.005 && realPx < 1 ? 1.0f : rint(realPx);
return result;
}

Expand Down

0 comments on commit 4bffbd2

Please sign in to comment.