Mathfx

From Unify Community Wiki
Revision as of 22:11, 15 December 2005 by Aarku (Talk | contribs)

Jump to: navigation, search

Description

The following snippet

Usage

C# - Mathfx.cs

<csharp> using UnityEngine; using System;

public class Mathfx {

   public float Hermite(float edge0, float edge1, float t)
   {
       float tt = Mathf.Min(Mathf.Max((t - edge0) /(edge1 - edge0), 0.0f), 1.0f);
       return tt * tt * (3F - 2F * tt);
   }
   
   public float Lerp(float start, float end, float value)
   {
       return ((1.0f - value) * start) + (value * end);
   }

} </csharp>

Personal tools
Namespaces

Variants
Actions
Navigation
Extras
Toolbox