mirror of
https://github.com/beefytech/Beef.git
synced 2025-07-06 16:25:59 +02:00
More operator constraint compliance
This commit is contained in:
parent
32cd6d8841
commit
2e3356d04a
8 changed files with 27 additions and 25 deletions
|
@ -21,7 +21,7 @@ namespace Beefy.widgets
|
|||
{
|
||||
public delegate T Interpolator(T from, T to, float pct);
|
||||
|
||||
public struct Entry : IOpComparable
|
||||
public struct Entry
|
||||
{
|
||||
public float mFrame;
|
||||
public T mValue;
|
||||
|
@ -99,7 +99,7 @@ namespace Beefy.widgets
|
|||
|
||||
public T GetValue(float frame)
|
||||
{
|
||||
if ((mEntries == null) || (mEntries.Count == 0))
|
||||
/*if ((mEntries == null) || (mEntries.Count == 0))
|
||||
return mConstantValue;
|
||||
|
||||
Entry find;
|
||||
|
@ -118,7 +118,8 @@ namespace Beefy.widgets
|
|||
Entry entry2 = mEntries[index + 1];
|
||||
|
||||
float aPct = (frame - entry1.mFrame) / (entry2.mFrame - entry1.mFrame);
|
||||
return mInterpolator(entry1.mValue, entry2.mValue, aPct);
|
||||
return mInterpolator(entry1.mValue, entry2.mValue, aPct);*/
|
||||
return default;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue