using EC.Helper.RabbitFunc.Expressions; using EC.Helper.RabbitFunc.Runtime; namespace EC.Helper.RabbitFunc.Extern; [ExternLambda] internal class AtanLambdaExpression : SystemLambdaExpression { public AtanLambdaExpression() : base(typeof(Math).GetMethod(nameof(Math.Atan), new Type[] { typeof(double) }), "atan", new BodyExpression(), Expression.Parameter(typeof(double), "x")) { } private class BodyExpression : Expression { public override object Eval(RuntimeContext context) { return Math.Atan(ParameterExpression.Access(context, "x")); } } }