[Solved] Converting 3 useful methods from AS3 to C# [closed]


Since they are using no class members, they can be declared as static methods. If these are integers, then use int otherwise you could use float or double depending on what you are passing.

public class MathHelpers {
             // int return type here
  public static int Normalize(int value, int minimum, int maximum)
  {
    return (value - minimum) / (maximum - minimum);
  }

}

Hopefully from that you can easily figure out how to convert the others.

solved Converting 3 useful methods from AS3 to C# [closed]