FINALLY match and link CCharAnimTime

This commit is contained in:
2024-03-19 18:20:58 -07:00
parent 1e7dc8884b
commit fb1a193a90
3 changed files with 14 additions and 10 deletions

View File

@@ -36,10 +36,10 @@ public:
bool GreaterThanZero() const;
bool EqualsZero() const;
void PutTo(COutputStream& out) const;
//static CCharAnimTime Infinity() { return CCharAnimTime(kT_Infinity, 1.0f); }
static CCharAnimTime Infinity() { return CCharAnimTime(kT_Infinity, 1.0f); }
static CCharAnimTime ZeroFlat() { return CCharAnimTime(kT_ZeroSteady, 0.f); }
//static CCharAnimTime ZeroPlus() { return CCharAnimTime(kT_ZeroIncreasing, 0.f); }
//static CCharAnimTime ZeroMinus() { return CCharAnimTime(kT_ZeroDecreasing, 0.f); }
static CCharAnimTime ZeroPlus() { return CCharAnimTime(kT_ZeroIncreasing, 0.f); }
static CCharAnimTime ZeroMinus() { return CCharAnimTime(kT_ZeroDecreasing, 0.f); }
int ZeroOrdering() const {
if (x4_type == kT_ZeroDecreasing) {
@@ -62,6 +62,15 @@ public:
return kT_ZeroIncreasing;
}
CCharAnimTime ZeroSignScale(float other) const {
if (other > 0.f) {
return *this;
} else if (other < 0.f) {
return CCharAnimTime(ZeroTypeFromOrdering(-ZeroOrdering()), 0.f);
}
return ZeroFlat();
}
private:
float x0_time;
EType x4_type;