Upload from upload_mods.ps1
This commit is contained in:
24
KFAttached/GG Camera Shake/Runtime/Power.cs
Normal file
24
KFAttached/GG Camera Shake/Runtime/Power.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
namespace CameraShake
|
||||
{
|
||||
public static class Power
|
||||
{
|
||||
public static float Evaluate(float value, Degree degree)
|
||||
{
|
||||
switch (degree)
|
||||
{
|
||||
case Degree.Linear:
|
||||
return value;
|
||||
case Degree.Quadratic:
|
||||
return value * value;
|
||||
case Degree.Cubic:
|
||||
return value * value * value;
|
||||
case Degree.Quadric:
|
||||
return value * value * value * value;
|
||||
default:
|
||||
return value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public enum Degree { Linear, Quadratic, Cubic, Quadric }
|
||||
}
|
||||
Reference in New Issue
Block a user