Skip to content

Commit

Permalink
remove(f, f) implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
rjkiv committed Jul 3, 2024
1 parent 99c925c commit c1aa892
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/system/math/Key.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,9 @@ template <class T1, class T2> class Keys : public std::vector<Key<T1> > {
iend = size() - 1;
}
else {
// TODO: once you have both functions called here matched, rename them
// these functions for Vector3, respectively: fn_802E3AE8 and fn_805FC2C4
istart = LowerBound(Max(fstart, front().frame));
iend = UpperBound(Minimum(fend, back().frame)); // a different function gets called here, behaves similarly to LowerBound(float) - fn_805FC2C4
iend = UpperBound(Minimum(fend, back().frame));
}
}

Expand Down Expand Up @@ -89,8 +88,11 @@ template <class T1, class T2> class Keys : public std::vector<Key<T1> > {
}

// fn_80653DE0 for Vector3 and fn_80653CE4 for Hmx::Quat
int Remove(float, float){

int Remove(float fstart, float fend){
int bound1 = UpperBound(fstart);
int bound2 = UpperBound(fend);
erase(&(*this)[bound1], &(*this)[bound2]);
return bound1;
}

// full method scratch (debug): https://decomp.me/scratch/IXqzR
Expand Down

0 comments on commit c1aa892

Please sign in to comment.