Re: Need a std::numeric_limits::lowest() equivalent

2017-02-17 Thread Nornimices via Digitalmars-d
I am not sure about it.

Re: Need a std::numeric_limits::lowest() equivalent

2017-01-23 Thread Dominikus Dittes Scherkl via Digitalmars-d
On Saturday, 21 January 2017 at 15:55:35 UTC, Xavier Bigand wrote: I don't see any other use case than for initialized maths struct to an invalid state, and because it is generally in template that working with integers and floats it is easier to have same properties (when it have the same

Re: Need a std::numeric_limits::lowest() equivalent

2017-01-21 Thread Xavier Bigand via Digitalmars-d
Le 21/01/2017 à 10:54, John Colvin a écrit : On Saturday, 21 January 2017 at 00:03:11 UTC, Xavier Bigand wrote: std::numeric_limits::lowest() is describe as "A finite value x such that there is no other finite value y * where y < x." According to what I presume that definition means

Re: Need a std::numeric_limits::lowest() equivalent

2017-01-21 Thread John Colvin via Digitalmars-d
On Saturday, 21 January 2017 at 00:03:11 UTC, Xavier Bigand wrote: std::numeric_limits::lowest() is describe as "A finite value x such that there is no other finite value y * where y < x." According to what I presume that definition means ("no other finite value" means "no other

Re: Need a std::numeric_limits::lowest() equivalent

2017-01-20 Thread Xavier Bigand via Digitalmars-d
Le 21/01/2017 à 00:50, Nordlöw a écrit : On Friday, 20 January 2017 at 23:45:38 UTC, Xavier Bigand wrote: Using -type.max is close to what I want but for integer int.min is different than -int.max. In c++11 there is std::numeric_limits::lowest() that works perfectly. Can an equivalent

Re: Need a std::numeric_limits::lowest() equivalent

2017-01-20 Thread Nordlöw via Digitalmars-d
On Friday, 20 January 2017 at 23:45:38 UTC, Xavier Bigand wrote: Using -type.max is close to what I want but for integer int.min is different than -int.max. In c++11 there is std::numeric_limits::lowest() that works perfectly. Can an equivalent property added to integer and floating types?

Need a std::numeric_limits::lowest() equivalent

2017-01-20 Thread Xavier Bigand via Digitalmars-d
Hi, I am creating an AABB struct that should be initialized in an invalid state. Here is my actual code : struct AABB(type, int dimensions) { static assert(dimensions == 2 || dimensions == 3); VectorType min = Vector!(type, 3)(type.max, type.max, type.max);