ACSUtils Wiki

An ACS library for ZDoom-based ports

User Tools

Site Tools


functions:npo2

This is an old revision of the document!


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.1489569051.txt.gz · Last modified: 2017/03/15 11:10 by korshun