fix some memory issues
This commit is contained in:
parent
df2215cef7
commit
473d4591b0
3 changed files with 6 additions and 23 deletions
|
|
@ -60,8 +60,8 @@ float CBezierCurve::getYForPoint(float x) {
|
|||
}
|
||||
|
||||
// in the name of performance i shall make a hack
|
||||
const auto LOWERPOINT = &m_aPointsBaked[(int)((float)BAKEDPOINTS * lowerT)];
|
||||
const auto UPPERPOINT = &m_aPointsBaked[(int)((float)BAKEDPOINTS * upperT)];
|
||||
const auto LOWERPOINT = &m_aPointsBaked[std::clamp((int)((float)BAKEDPOINTS * lowerT), 0, 199)];
|
||||
const auto UPPERPOINT = &m_aPointsBaked[std::clamp((int)((float)BAKEDPOINTS * upperT), 0, 199)];
|
||||
|
||||
const auto PERCINDELTA = (x - LOWERPOINT->x) / (UPPERPOINT->x - LOWERPOINT->x);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue