Two nodes the same in Script Canvas?!

Hi LY Team,
I using amazon lumberyard since 2016 , I found two nodes the same in script canvas 1.19.

Aren’t these two nodes the same?
I didn’t see the datatype of integers at 1.19.
All numbers are decimal places.

Math/Random

please fix it.
Thank you

Hi @_AhmadKarami. Thanks for bringing this up.
Random Integer is an int type and Random Number is a float type.
It may be a bad naming. I’ll let the team know. See the code below:

{ // RandomInteger
    for (int i = 0; i < testIterations; ++i)
    {
        auto output = TestMathFunction<RandomNodes::RandomIntegerNode>({ "Number: Min", "Number: Max" }, { Datum(9), Datum(99) }, { "Result: Number" }, { Datum(Data::NumberType()) });
        auto value = *output[0].GetAs<Data::NumberType>();
        EXPECT_TRUE(value >= 9);
        EXPECT_TRUE(value <= 99);
    }
}

{ // RandomNumber
    for (int i = 0; i < testIterations; ++i)
    {
        auto output = TestMathFunction<RandomNodes::RandomNumberNode>({ "Number: Min", "Number: Max" }, { Datum(9.f), Datum(99.f) }, { "Result: Number" }, { Datum(Data::NumberType()) });
        auto value = *output[0].GetAs<Data::NumberType>();
        EXPECT_TRUE(value >= 9);
        EXPECT_TRUE(value <= 99);
    }
}
2 Likes

Thank you so much.
got it. :pray: :rose: