ACSUtils Wiki

An ACS library for ZDoom-based ports

User Tools

Site Tools


functions:npo2

Table of Contents

npo2

Description

Returns x rounded up to the the Next Power Of 2. The input must be positive.

If x is a power of 2, x is unchanged.

Examples

npo2(16) -> 16
npo2(17) -> 32
npo2(6.5) -> 8.0
npo2(8.0) -> 8.0
functions/npo2.txt · Last modified: 2017/04/15 17:30 by korshun