- using UnityEngine;
- using System.Collections;
- public class MathfSinCosPrint : MonoBehaviour {
- // Use this for initialization
- void Start () {
- print("삼각함수");
- float sin0 = Mathf.Sin(0 * Mathf.Deg2Rad);
- print("sin0 = 0 ," + sin0);
- float sin30 = Mathf.Sin(30 * Mathf.Deg2Rad);
- print("sin30 = 1/2 ," + sin30);
- float sin45 = Mathf.Sin(45 * Mathf.Deg2Rad);
- print("sin45 = 루트2/2 ," + sin45);
- float sin60 = Mathf.Sin(60 * Mathf.Deg2Rad);
- print("sin60 = 루트3/2 ," + sin60);
- float sin90 = Mathf.Sin(90 * Mathf.Deg2Rad);
- print("sin90 = 1 ," + sin90);
- float cos0 = Mathf.Cos(0 * Mathf.Deg2Rad);
- print("cos0 = 1 ,"+cos0);
- float cos30 = Mathf.Cos(30 * Mathf.Deg2Rad);
- print("cos30 = 루트3/2 ," + cos30);
- float cos45 = Mathf.Cos(45 * Mathf.Deg2Rad);
- print("cos45 = 루트2/2 ," + cos45);
- float cos60 = Mathf.Cos(60 * Mathf.Deg2Rad);
- print("cos60 = 1/2 ,"+cos60);
- double cos90 = Mathf.Cos(90 * Mathf.Deg2Rad);
- print("cos90 = 0 ," + cos90);
- int m10 = Mathf.Abs(-10);
- print ("Mathf.Abs(-10)" + m10);
- }
- // Update is called once per frame
- void Update () {
- }
- }
cos 90 이상함
'Unity > C# 언어' 카테고리의 다른 글
LateUpdate 함수 번역 (0) | 2016.02.05 |
---|---|
하얀소닉 코드 선언 방식 가이드라인 참조 (0) | 2015.11.11 |
generic class serialization Unity3d (0) | 2014.12.25 |
pow 제곱 연산 (0) | 2014.04.04 |