mirror of
https://github.com/ValveSoftware/source-sdk-2013.git
synced 2025-04-08 19:12:51 +00:00
Fixed incorrect variable usage in HaltonSequenceGenerator_t::GetElement(int) which caused the function to always return a value based on the seed instead of the passed in parameter. Recompiled mathlib.
(cherry picked from commit 762e7408c71857e72f0f82544a49257678f71f4a)
This commit is contained in:
parent
e2f7bc3029
commit
049fa3e358
6 changed files with 6 additions and 6 deletions
Binary file not shown.
|
@ -14,9 +14,9 @@ HaltonSequenceGenerator_t::HaltonSequenceGenerator_t(int b)
|
|||
|
||||
}
|
||||
|
||||
float HaltonSequenceGenerator_t::GetElement(int elem)
|
||||
float HaltonSequenceGenerator_t::GetElement(int elem) const
|
||||
{
|
||||
int tmpseed=seed;
|
||||
int tmpseed=elem;
|
||||
float ret=0.0;
|
||||
float base_inv=1.0/fbase;
|
||||
while(tmpseed)
|
||||
|
|
|
@ -30,7 +30,7 @@ class HaltonSequenceGenerator_t
|
|||
public:
|
||||
HaltonSequenceGenerator_t(int base); //< base MUST be prime, >=2
|
||||
|
||||
float GetElement(int element);
|
||||
float GetElement(int element) const;
|
||||
|
||||
inline float NextValue(void)
|
||||
{
|
||||
|
|
Binary file not shown.
|
@ -14,9 +14,9 @@ HaltonSequenceGenerator_t::HaltonSequenceGenerator_t(int b)
|
|||
|
||||
}
|
||||
|
||||
float HaltonSequenceGenerator_t::GetElement(int elem)
|
||||
float HaltonSequenceGenerator_t::GetElement(int elem) const
|
||||
{
|
||||
int tmpseed=seed;
|
||||
int tmpseed=elem;
|
||||
float ret=0.0;
|
||||
float base_inv=1.0/fbase;
|
||||
while(tmpseed)
|
||||
|
|
|
@ -30,7 +30,7 @@ class HaltonSequenceGenerator_t
|
|||
public:
|
||||
HaltonSequenceGenerator_t(int base); //< base MUST be prime, >=2
|
||||
|
||||
float GetElement(int element);
|
||||
float GetElement(int element) const;
|
||||
|
||||
inline float NextValue(void)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue