Skip to content

Instantly share code, notes, and snippets.

@BcRikko
Created March 30, 2015 08:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BcRikko/4a158a3fa22822ada157 to your computer and use it in GitHub Desktop.
Save BcRikko/4a158a3fa22822ada157 to your computer and use it in GitHub Desktop.
三角関数の使い方
using System;
// 角度が30°の場合
var angle = 30;
var sin = Math.Sin(angle * (Math.PI / 180));
var cos = Math.Cos(angle * (Math.PI / 180));
var tan = Math.Tan(angle * (Math.PI / 180));
//"Sin:0.5, Cos:0.87, Tan:0.58" ※少数第二位で四捨五入
Console.WriteLine("Sin:{0}, Cos:{1}, Tan:{2}", sin, cos, tan);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment