From b0cee37e581a20c06ff8225fde8b8de95f68d09e Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Sat, 7 Jan 2017 16:25:57 -0800 Subject: sparkler: prefer *.5 to / 2 Multiplies tend to be less costly --- modules/sparkler/particles.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/sparkler/particles.c') diff --git a/modules/sparkler/particles.c b/modules/sparkler/particles.c index ee23972..daf60ef 100644 --- a/modules/sparkler/particles.c +++ b/modules/sparkler/particles.c @@ -216,7 +216,7 @@ bsp_t * particles_bsp(particles_t *particles) static inline void _particles_draw(particles_t *particles, list_head_t *list, fb_fragment_t *fragment) { - float w2 = fragment->width / 2, h2 = fragment->height / 2; + float w2 = fragment->width * .5f, h2 = fragment->height * .5f; _particle_t *p; assert(particles); -- cgit v1.2.3