Mathfは結構使う場合が多い割に 良く忘れるので、Mathfの処理をメモ(一部)。 ----------------------------------------------- Mathf.Floor() 切り捨て Mathf.Ceil() 切り上げ Mathf.Round() より近い整数の値を返す(0.5の場合は偶数になる) Mathf.FloorToInt() 切り捨て(Int型に変換) Mathf.CeilToInt() 切り上げ(Int型に変換) Mathf.RoundToInt() 四捨五入(Int型に変換) Mathf.Abs() 絶対値 Mathf.Sign() 正負の判別(正を1/負を-1 で返す) Mathf.Clamp() 最大値の制限 Mathf.Min()
![【Unity Tips】 Mathf(数学関数)に関してのメモ: Karasuのアプリ奮闘記](https://cdn-ak-scissors.b.st-hatena.com/image/square/d23471bd8e974f24f231e9c65ecb4c7b94d968cd/height=288;version=1;width=512/http%3A%2F%2Fhideapp.cocolog-nifty.com%2F.shared-pleasy%2Fnifty_managed%2Fimages%2Fweb%2Fogp%2Fdefault.png)