コード例 #1
0
ファイル: ClassArcsine.cs プロジェクト: pogrebnjak/doodle2
        public void ArcsineTest(double value, double expected)
        {
            IOoneCalculator calculator = OneArgumentFactory.CreateCalculator("Arcsine");
            double          result     = calculator.Calculate(value);

            Assert.AreEqual(expected, result, 0.01);
        }
コード例 #2
0
        private void button1_Click_1(object sender, EventArgs e)
        {
            double firstNumber = Convert.ToDouble(textBox1.Text);


            IOoneCalculator calculator  = OneArgumentFactory.CreateCalculator(((Button)sender).Name);
            double          answerDigit = calculator.Calculate(firstNumber);

            textBox3.Text = answerDigit.ToString();
        }