What is a short, fast way of testing whether x in [a, b]?

Enjoys Math via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun Feb 7 18:47:24 PST 2016


Right now I'm using a logical ||:

if (!(2*PI - EPS!float <= t1-t0 || t1-t0 <= 2*PI + EPS!float)) {

But I'll be doing this a lot, so was wondering if there's a D 
native way of doing it.

Thanks.


More information about the Digitalmars-d-learn mailing list