On Friday, 11 October 2013 at 20:31:50 UTC, Spacen Jasset wrote:
I will have to learn about what "to" does exactly. It wasn't around when I looked at D x years ago.

http://dlang.org/phobos/std_conv.html#.to

Its principal benefit is that it can do overflow checks, so it's worth using unless there is a very extreme speed requirement. That's why I suggest trying it first (in combination with floor()) and then perhaps replacing to!int with a cast only if it turns out to be unacceptably slow.

Reply via email to