万年素人からHackerへの道

万年素人がHackerになれるまで殴り書きするぜ。

  • ・資産運用おすすめ
    10万円は1000円くらい利益
    • ・寄付お願いします
      YENTEN:YYzNPzdsZWqr5THWAdMrKDj7GT8ietDc2W
      BitZenny:ZfpUbVya8MWQkjjGJMjA7P9pPkqaLnwPWH
      c0ban:8KG95GXdEquNpPW8xJAJf7nn5kbimQ5wj1
      Skycoin:KMqcn7x8REwwzMHPi9fV9fbNwdofYAWKRo

    Vector3.Angle Unity実行

         public static float Angle(Vector3 from, Vector3 to)
            {
                return Mathf.Acos(Mathf.Clamp(Vector3.Dot(from.normalized, to.normalized), -1f, 1f)) * 57.29578f;
            }
                float judgeAngle = Vector3.Angle(Vector3.zero, Vector3.zero);
                Debug.Log(judgeAngle);
    
                judgeAngle = Vector3.Angle(Vector3.right, Vector3.zero);
                Debug.Log(judgeAngle);
    
                judgeAngle = Vector3.Angle(Vector3.zero, Vector3.right);
                Debug.Log(judgeAngle);
    
                judgeAngle = Vector3.Angle(Vector3.zero, Vector3.right);
                Debug.Log(judgeAngle);
    
                judgeAngle = Vector3.Angle(Vector3.zero, new Vector3(13, 441, 45));
                Debug.Log(judgeAngle);
    
                judgeAngle = Vector3.Angle(new Vector3(13, 441, 45), Vector3.zero);
                Debug.Log(judgeAngle);
    
                judgeAngle = Vector3.Angle(Vector3.forward, Vector3.zero);
                Debug.Log(judgeAngle);
    
                judgeAngle = Vector3.Angle(Vector3.back, Vector3.zero);
                Debug.Log(judgeAngle);
    
                judgeAngle = Vector3.Angle(Vector3.zero, Vector3.up);
                Debug.Log(judgeAngle);
    // => ここまで90
    
                judgeAngle = Vector3.Angle(Vector3.right, Vector3.left);
                Debug.Log(judgeAngle);
    // => 180
    
                judgeAngle = Vector3.Angle(Vector3.left, Vector3.left);
                Debug.Log(judgeAngle);
    // => 0
    
                judgeAngle = Vector3.Angle(Vector3.right, Vector3.right);
                Debug.Log(judgeAngle);
    // => 0