On Thursday, 10 October 2013 at 22:27:14 UTC, Spacen Jasset wrote:
Hello,
I am after a fast floor function; In fact a fast truncation and
conversion to integer. I see that std.math takes a real, and
that std.c.math takes a double.
Is there a quicker function, and what might cast(int)1.5f do?
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 th
On 11/10/2013 07:25, monarch_dodra wrote:> On Thursday, 10 October 2013
at 22:27:14 UTC, Spacen Jasset wrote:
>> Hello,
>>
>> I am after a fast floor function; In fact a fast truncation and
>> conversion to integer. I see that std.math takes a real, and that
>> std.c.math takes a double.
>>
>> Is
Am 11.10.2013 00:27, schrieb Spacen Jasset:
Hello,
I am after a fast floor function; In fact a fast truncation and
conversion to integer. I see that std.math takes a real, and that
std.c.math takes a double.
Is there a quicker function, and what might cast(int)1.5f do?
Regards,
Spacen.
For
On Thursday, 10 October 2013 at 22:27:14 UTC, Spacen Jasset wrote:
Hello,
I am after a fast floor function; In fact a fast truncation and
conversion to integer. I see that std.math takes a real, and
that std.c.math takes a double.
Is there a quicker function, and what might cast(int)1.5f do?
On 11/10/13 00:27, Spacen Jasset wrote:
I am after a fast floor function; In fact a fast truncation and conversion to
integer. I see that std.math takes a real, and that std.c.math takes a double.
Is there a quicker function, and what might cast(int)1.5f do?
What's wrong with
to!int(floor