Mathf.Log

public static float Log(float f, float p);

Description

Returns the logarithm of a specified number in a specified base.

using UnityEngine;

public class ScriptExample : MonoBehaviour { void Start() { // logarithm of 6 in base 2 // prints 2.584963 Debug.Log(Mathf.Log(6, 2)); } }
posted @ 2020-08-12 13:34  流星曳尾  阅读(302)  评论(0编辑  收藏  举报