Created
June 15, 2018 08:54
-
-
Save todorok1/076da97e5c3fe62ee3171ee0d8098970 to your computer and use it in GitHub Desktop.
無限大について全力で考えてみる
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void CheckOverFlow(){ | |
// 最大値を超えた時の動作を確認 | |
float overMax = float.MaxValue + 1.0f; | |
Debug.Log("overMax : " + overMax); | |
float overMax31 = float.MaxValue + 1.0e+31f; | |
Debug.Log("overMax31 : " + overMax31); | |
float overMax32 = float.MaxValue + 1.0e+32f; | |
Debug.Log("overMax32 : " + overMax32); | |
float overMax33 = float.MaxValue + 1.0e+33f; | |
Debug.Log("overMax33 : " + overMax33); | |
// 最小値を下回った時の動作を確認 | |
float underMin = float.MinValue - 1.0f; | |
Debug.Log("underMin : " + underMin); | |
float underMin31 = float.MinValue - 1.0e+31f; | |
Debug.Log("underMin31 : " + underMin31); | |
float underMin32 = float.MinValue - 1.0e+32f; | |
Debug.Log("underMin32 : " + underMin32); | |
float underMin33 = float.MinValue - 1.0e+33f; | |
Debug.Log("underMin33 : " + underMin33); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment