mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 21:47:45 +00:00
Everywhere: Don't promote float to double where not needed
The `float => double => float` round trip seen in a couple of places might pessimize the code. Even if it's truncated to an int in the end, it's weird not to use the functions with the `f` suffixes when working with single precision floats.
This commit is contained in:
parent
01a0aa6e0b
commit
f14a4994b0
6 changed files with 16 additions and 16 deletions
|
@ -106,8 +106,8 @@ public:
|
|||
template<typename GlyphCb>
|
||||
RefPtr<Gfx::Bitmap> raster_composite(float x_scale, float y_scale, GlyphCb glyph_callback) const
|
||||
{
|
||||
u32 width = (u32)(ceil((m_xmax - m_xmin) * x_scale)) + 1;
|
||||
u32 height = (u32)(ceil((m_ymax - m_ymin) * y_scale)) + 1;
|
||||
u32 width = (u32)(ceilf((m_xmax - m_xmin) * x_scale)) + 1;
|
||||
u32 height = (u32)(ceilf((m_ymax - m_ymin) * y_scale)) + 1;
|
||||
Rasterizer rasterizer(Gfx::IntSize(width, height));
|
||||
auto affine = Gfx::AffineTransform().scale(x_scale, -y_scale).translate(-m_xmin, -m_ymax);
|
||||
ComponentIterator component_iterator(m_slice);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue