「毎日Unity」の技術ブログ

開発で役立つ情報を発信する

2023-03-29から1日間の記事一覧

【UnityC#】Math.Pow(i, 3)、Mathf.Pow(i, 3)、i * i * iの速度比較

Math.Pow(i, 3)、Mathf.Pow(i, 3)、i * i * iの速度比較をしたので結果を残しておきます。 [ 環境 ] Unity 2021.2.19.f1 [ 比較結果 ] Math.Pow(i, 3) 26 ms Mathf.Pow(i, 3) 55 ms i * i * i 0 ms PowInt(i, 3) 3 ms [ スクリプト ] using System.Collectio…

【UnityC#】Math.Cos、Mathf.Cosの速度比較

Math.Cos、Mathf.Cosの速度比較をしたので結果を残しておきます。 [ 環境 ] Unity 2018.4.14.f1 [ 比較結果 ] Math.Cos 20 ms Mathf.Cos 31 ms [ スクリプト ] using System.Collections; using System.Collections.Generic; using UnityEngine; using Syste…