public static LinearColor CInterpTo(LinearColor Current, LinearColor Target, float DeltaTime, float InterpSpeed) { // If no interp speed, jump to target value if (InterpSpeed <= 0f) { return(Target); } // Difference between colors float Dist = LinearColor.Dist(Target, Current); // If distance is too small, just set the desired color if (Dist < Const.KINDA_SMALL_NUMBER) { return(Target); } // Delta change, Clamp so we do not over shoot. var DeltaMove = (Target - Current) * Math.Clamp(DeltaTime * InterpSpeed, 0f, 1f); return(Current + DeltaMove); }
private extern static void _SetSelectedSplineSegmentColor(IntPtr handler, LinearColor SelectedSplineSegmentColor);
private extern static void _SetColorParameter(IntPtr handler, string ParameterName, LinearColor Param);
public void SetColorParameter(string ParameterName, LinearColor Param) { _SetColorParameter(NativeHandler, ParameterName, Param); }
private extern static void _SetVectorParameter(IntPtr handler, string name, LinearColor value);
public void SetVectorParameter(string name, LinearColor value) { _SetVectorParameter(NativeHandler, name, value); }