Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


Log2Floor(int)

Returns the binary logarithm of the value, but the result is rounded down to the nearest integer.
Read time 1 minuteLast updated 12 days ago

Definition

  • Type: Method
  • Namespace: Unity.Collections
  • Assembly: UnityEngine.ManagedKernelModule
public static int Log2Floor(int value)

Parameters

value

The value.

Returns

Type

Description

intThe binary logarithm of the
value
, but the result is rounded down to the nearest integer.