Utils

A global module that provides generic utility functions available to all Script and Utility.

See Also

Functions


Name Description
IsPowerOf2 Determine wether or not a specific value is a power of two.
GetNextPowerOf2 Retrieve the next power of two of for an arbitrary value.
GetNearestPowerOf2 Function that retrieves the closests power of two of an arbitrary value.
GetMipmapMemUsage Return the approximated memory usage used by the mipmap pyramid associated to a specific Texture.
GetMipmapCount Return the size of the mipmap pyramid for a certain pixel width and height.
CpuSleep Force the CPU thread to sleep for an amount of milliseconds.
GetMilliTime Return the amount of milliseconds elapsed since the begining of the application.
GetMicroTime Return the amount of microseconds elapsed since the begining of the application.
IsDir Check if a specific filepath is a valid directory.
IsFile Helper that confirm that a file exists.
MakeDir Function that creates a new directory.
Hash Calculate the hash value of a string.
Crc32 Function that calculate the CRC of a string.
GetUID Return a global unique identifier.
FileCopy Copy a file from one location to another.
GetUser Return the user directory running the application; it is a safe place to write application data.
GetHome Return the directory where the the application resides.
GetExtern Return the extern directory of the application where all external files are stored or extracted.
BinaryToHeader Convert a binary file to a C/C++ header file.
GetCurrentMemory Amount of actual memory (in bytes) your application is using.
GetMemoryPeak The memory peak of your application in bytes.
PrintLegal Print on the console or output log the licenses of the libraries used by NRG.




NRG - API 2022.4.384543 - Fri Nov 4 2022
Copyright © 2022 nrgcore.com. All Rights Reserved. Terms of Service - Privacy Policy - EULA