예제 #1
0
 public MaxFunction()
 {
     Max = Utils.MakeFunction(LConstants.MAX_F,
                              (values, func) =>
     {
         func.CheckParamCount(values.Length);
         float[] parameters = MeArray.ToFloatArray(values);
         MeNumber maxNumber = parameters.Max();
         return(maxNumber);
     }, CommonParamTypes.SingleNumber, CommonValidators.NumberArray, false);
 }
예제 #2
0
 public MinFunction()
 {
     Min = Utils.MakeFunction(LConstants.MIN_F,
                              (values, func) =>
     {
         func.CheckParamCount(values.Length);
         float[] parameters = MeArray.ToFloatArray(values);
         MeNumber result    = parameters.Min();
         return(result);
     }, CommonParamTypes.SingleNumber, CommonValidators.NumberArray, false);
 }