From 4bffbd284817f61f95a367a8a66d8b7b7e3f7f6d Mon Sep 17 00:00:00 2001 From: miomin Date: Thu, 26 Jul 2018 14:39:30 +0800 Subject: [PATCH] * [android] Use rint on getFloatByViewport. --- weex_core/Source/base/ViewUtils.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weex_core/Source/base/ViewUtils.h b/weex_core/Source/base/ViewUtils.h index d6cbf4e8ff..dcfe30fb81 100644 --- a/weex_core/Source/base/ViewUtils.h +++ b/weex_core/Source/base/ViewUtils.h @@ -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; }