Example #1
0
File: XYZ.cs Project: l2obin/Dynamo
        public override FScheme.Value Evaluate(FSharpList <FScheme.Value> args)
        {
            if (!args[0].IsList)
            {
                throw new Exception("A list of XYZs is required to average.");
            }

            var lst     = ((FScheme.Value.List)args[0]).Item;
            var average = BestFitLine.MeanXYZ(BestFitLine.AsGenericList <XYZ>(lst));

            return(FScheme.Value.NewContainer(average));
        }