Does cocos2d::RandomHelper::random_real include or exclude the Max value?

Hi guys, new here,

We’re porting our Marmalade codebase to cocos2d-x

It is a lot of fun but we have so many questions that most of the time we can answer reading guides, docs, code but I’m stuck with this one.

Does cocos2d::RandomHelper::random_real include or exclude the max value?

    float f = cocos2d::RandomHelper::random_real<float>(0.f, 1.f);
    //can f be equal to 1.f here?

The docs say this

Returns a random value between min and max.

For me between is excluding but not sure!

Thank you

Checking the source, it’s based on std::uniform_real_distribution. It includes the lower bound, but excludes the upper bound. In other words: uniform on the interval [0, 1).

Oh you’re right, thank you so much for the pointer