浏览代码

inlined random class construction

/main
Steven Leal 4 年前
当前提交
7c14f6cc
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 3
      com.unity.perception/Runtime/Randomization/Samplers/SamplerTypes/UniformSampler.cs

3
com.unity.perception/Runtime/Randomization/Samplers/SamplerTypes/UniformSampler.cs


/// <returns>The generated sample</returns>
public float Sample()
{
var newRandomState = ScenarioBase.activeScenario.NextRandomState();
var rng = new Unity.Mathematics.Random(newRandomState);
var rng = new Unity.Mathematics.Random(ScenarioBase.activeScenario.NextRandomState());
return rng.NextFloat(range.minimum, range.maximum);
}

正在加载...
取消
保存