You could just use the noise function for something like that which would be easier. and you likely wouldn’t notice a difference if you “zoom out” enough with it
“In observance of the gift-giving season”
…
Ehh. Oh. Thanks.
This is now live.
Question about NextNumber(), technically, does it include the min, and approach the max?
Found a minor quirk:
while wait() do
local R = Random.new(-tick())
print(R:NextNumber())
end
will print the same number for one second, until the seed changes.
I think that is expected as it’s not exactly the right way to use it, but…
Yeah, notice the interval notation:
Closed at min, and open at max, so min <= x < max
Yeah, the range is [min,max)
.
You don’t get the title, hmm?
It’s quite literally random
So in the example:
rng:NextNumber(0, 255)
Does this mean that you will never get 255 as a value?
Since we’re talking about floats, not ints, would it really matter?
That’s correct, you’ll never hit 255.
Why not include the end value for NextNumber and make it consistent with how NextInteger works?
You know what would be nice? If the Random data type had support for things like Vector3s.
That might be too specific a use case. Besides, it’s v. easy to make a helper function for that purpose.
Then again, you’re right.
support
5 posts were merged into an existing topic: Off-topic and bump posts
Please do not necrobump threads.