예제 #1
0
        public override double FinalValue(Axis axis)
        {
            var leftVal  = left.FinalValue(axis);
            var rightVal = right.FinalValue(axis);

            switch (operation)
            {
            case GraphValueOperation.Add: return(leftVal + rightVal);

            case GraphValueOperation.Subtract: return(leftVal - rightVal);

            case GraphValueOperation.Multiply: return(leftVal * rightVal);

            case GraphValueOperation.Divide:
                return(leftVal / rightVal);

            default:
                throw new ArgumentOutOfRangeException();
            }
        }
예제 #2
0
 public void Line(GraphValue x1, GraphValue y1, GraphValue x2, GraphValue y2, Pen pen)
 {
     target.Line(x1.FinalValue(XAxis), y1.FinalValue(YAxis), x2.FinalValue(XAxis), y2.FinalValue(YAxis), pen);
 }