[Header] Limits

Documentation, usage tips and configuration guides for Titan Two scripts and bytecodes published by the community users.

[Header] Limits

Postby PoshLemur » Tue May 22, 2018 11:11 pm

Provides easy access to the min and max values of different variable constants.

The code below is made available directly through the Online Resources > GPC Headers of Gtuner.
Code: Select all
#ifndef LIMITS_GPH_
#define LIMITS_GPH_
 
#define CHAR_BIT 8
 
#define CHAR_MIN -128
#define CHAR_MAX 127
#define UINT8_MIN 0
#define UINT8_MAX 255
#define UINT16_MIN 0
#define UINT16_MAX 65535
#define UINT32_MIN 0
#define UINT32_MAX 4294967295
#define INT8_MIN -128
#define INT8_MAX 127
#define INT16_MIN -32768
#define INT16_MAX 32767
#define INT32_MIN -2147483648
#define INT32_MAX 2147483647
#define FIX32_MIN -32768.000000
#define FIX32_MAX 32767.999985
 
// int in ConsoleTuner's GPC2 Script defaults to int16.
#define INT_MIN INT16_MIN
#define INT_MAX INT16_MAX
 
#endif /*LIMITS_GPH_*/
My github account: [link]
User avatar
PoshLemur
Sergeant Major
Sergeant Major
 
Posts: 75
Joined: Thu Mar 08, 2018 9:26 am

Return to User's Script Documentation

Who is online

Users browsing this forum: Pjd1234 and 172 guests