Math.Atanの読み方

Math.Atanの読み方

C#で利用されるメソッドの1つである「Math.Atan」の読み方を掲載してます。

読み⽅

マス・アークタンジェント」と読みます。

Math.Atanとは

C#で、高さと底辺から角度を求めるメソッドとなります。

using System;

namespace sebeeapp
{
    class Program
    {
        static void Main(string[] args)
        {

            double a, b, c;
            
            a = 2; // 高さ
            b = 2; // 底辺

            // 角度を求める
            c = Math.Atan(a / b) * 180.0 / Math.PI;
            Console.WriteLine((int)c); // 45

        }
    }
}