浏览代码

made if inline

/fix_sampler_rounding_issue
Mohsen Kamalzadeh 3 年前
当前提交
a58963fb
共有 1 个文件被更改,包括 1 次插入5 次删除
  1. 6
      com.unity.perception/Runtime/Randomization/Parameters/CategoricalParameter.cs

6
com.unity.perception/Runtime/Randomization/Parameters/CategoricalParameter.cs


if (uniform)
{
var index = (int)(randomValue * m_Categories.Count);
if (index == m_Categories.Count)
{
index--;
}
index = index == m_Categories.Count ? index - 1 : index;
return m_Categories[index];
}
return m_Categories[BinarySearch(randomValue)];

正在加载...
取消
保存