You are currently viewing the gmlscripts.pro static mirror. Forum access and script submissions are not available through this mirror.

Invert gmlscripts.pro

word_max_value

maxval = word_max_value(3,8);   //  ==  16777215
maxval = word_max_value(1,16);  //  ==  65535
maxval = word_max_value(6,1);   //  ==  63
word_max_value(length,size)
Returns the largest unsigned integer that can be stored in a given number of words of a given size.
COPY/// word_max_value(length,size)
//
//  Returns the largest unsigned integer that can be
//  stored in a given number of words of a given size.
//
//      length      number of words, integer
//      size        size of word in bits, integer
//
/// gmlscripts.pro/license
{
    return (1 << (argument0 * argument1)) - 1;
}

Contributors: Leif902, xot

GitHub: View · Commits · Blame · Raw