mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-10 14:41:50 +00:00
sw_engine: fix build warning
warning: absolute value function 'fabsf' given an argument of type 'double' but has parameter of type 'float' which may cause truncation of value [-Wabsolute-value]
This commit is contained in:
parent
c407d4d13d
commit
ac90ea302d
1 changed files with 2 additions and 2 deletions
|
@ -151,7 +151,7 @@ bool _prepareRadial(SwFill* fill, const RadialGradient* radial, const Matrix* tr
|
|||
//FIXME; Scale + Rotation is not working properly
|
||||
radius *= sx;
|
||||
|
||||
if (fabsf(sx - sy) > FLT_EPSILON) {
|
||||
if (abs(sx - sy) > FLT_EPSILON) {
|
||||
fill->sx = sx;
|
||||
fill->sy = sy;
|
||||
}
|
||||
|
@ -240,7 +240,7 @@ void fillFetchLinear(const SwFill* fill, uint32_t* dst, uint32_t y, uint32_t x,
|
|||
float t = (fill->linear.dx * rx + fill->linear.dy * ry + fill->linear.offset) * (GRADIENT_STOP_SIZE - 1);
|
||||
float inc = (fill->linear.dx) * (GRADIENT_STOP_SIZE - 1);
|
||||
|
||||
if (fabsf(inc) < FLT_EPSILON) {
|
||||
if (abs(inc) < FLT_EPSILON) {
|
||||
auto color = _fixedPixel(fill, static_cast<int32_t>(t * FIXPT_SIZE));
|
||||
rasterRGBA32(dst, color, offset, len);
|
||||
return;
|
||||
|
|
Loading…
Add table
Reference in a new issue