On Mon, 23 Jun 2014 09:32:09 +0200 "Roberto E. Vargas Caballero" <k...@shike2.com> wrote:
> For me it is ok to, but I think we are losing the point here. Why st has a > macro called CEIL instead of using ceil?, because it is used only with > integers, and in this case is faster use CEIL instead of calling ceil (with > or without tgmath.h). So the point is, do we need this optimization? No, this is wrong. Check cwscale and chscale in config.h, which are floats. xw.cw = CEIL(dc.font.width * cwscale); xw.ch = CEIL(dc.font.height * chscale); dc.font.width and dc.font.height are integers, but CEIL exlusively deals with floats. However, after further investigation, I also conclude including math.h is not necessary. We may then substitute CEIL with ceilf, but this would imply refactoring other macros too. Given this very limited use-case which doesn't add much complexity to the program (CEIL is a very simple macro), including math.h is overkill. Cheers FRIGN -- FRIGN <d...@frign.de>