#Peer type resolution
1 messages · Page 1 of 1 (latest)
Floats and integers are a different beast, you have to explicitly convert between them.
ok so I'm supposed to use @intToFloat function to explicitly do the conversion in these cases right?
and what I'm supposed to do when b is a generic type that could be both int or float (of any size)? is there an easy way to check if a type is a float?
Sure, std.meta.trait.is(.Float)(T)