Class UniformFloatDistribution
java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.std.UniformFloatDistribution
- All Implemented Interfaces:
ConstJoltPhysicsObject,AutoCloseable,Comparable<JoltPhysicsObject>
Generate uniformly distributed
float values. (native type:
std::uniform_real_distribution<float>)
The algorithm isn't specific to Jolt Physics. It's included in Jolt JNI for expediency, since BroadPhaseInsertionTest.cpp uses it.
-
Constructor Summary
ConstructorsConstructorDescriptionUniformFloatDistribution(float min, float max) Instantiate a uniform distribution with the specified range of output values. -
Method Summary
Modifier and TypeMethodDescriptionfloatnextFloat(RandomNumberEngine generator) Iterate and return the nextfloatvalue in the sequence.Methods inherited from class com.github.stephengold.joltjni.JoltPhysicsObject
close, compareTo, equals, getContainingObject, hasAssignedNativeObject, hashCode, isCleanerStarted, ownsNativeObject, setVirtualAddress, setVirtualAddress, startCleaner, targetVa, toString, va
-
Constructor Details
-
UniformFloatDistribution
public UniformFloatDistribution(float min, float max) Instantiate a uniform distribution with the specified range of output values.- Parameters:
min- the desired lower limitmax- the desired upper limit
-
-
Method Details
-
nextFloat
Iterate and return the nextfloatvalue in the sequence.- Parameters:
generator- the sequence generator to use (not null, modified)- Returns:
- the value
-