未验证 提交 f5811bad 编写于 作者: E Ebrahim Byagowi 提交者: GitHub

Add round to F2DOT14 inner store setter (#990)

It uses floor implicitly without it but explicit use of round will be more correct.
上级 39754fb6
......@@ -685,7 +685,7 @@ struct F2DOT14 : HBINT16
{
// 16384 means 1<<14
inline float to_float (void) const { return ((int32_t) v) / 16384.0; }
inline void set_float (float f) { v.set (f * 16384.0); }
inline void set_float (float f) { v.set (round (f * 16384.0)); }
public:
DEFINE_SIZE_STATIC (2);
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册