以下の内容はhttps://baba-s.hatenablog.com/entry/2020/11/25/090000より取得しました。


【Unity】Mathf.Clamp、Mathf.Max、Mathf.Min を拡張メソッドで呼び出せるようにするパッケージ「UniClampExtensionMethods」を GitHub に公開しました

リポジトリ

使用例

using Kogane;
using UnityEngine;

public class Example : MonoBehaviour
{
    private void Awake()
    {
        int i = 25;

        Debug.Log( i.Clamp( 0, 100 ) );
        Debug.Log( i.Max( 100 ) );
        Debug.Log( i.Min( 0 ) );

        float f = 25f;

        Debug.Log( f.Clamp01() );
        Debug.Log( f.Clamp( 0, 100 ) );
        Debug.Log( f.Max( 100 ) );
        Debug.Log( f.Min( 0 ) );
    }
}



以上の内容はhttps://baba-s.hatenablog.com/entry/2020/11/25/090000より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14