pitype

void color(r, g, b, a)

Name
Type
Description

r

float

value 0 - 1

g

float

value 0 - 1

b

float

value 0 - 1

a

float

value 0 - 1

var COLOR_WHITE -> color(1, 1, 1, 1)

var COLOR_BLACK -> color(0, 0, 0, 1)

var COLOR_RED -> color(1, 0, 0, 1)

var COLOR_GREEN -> color(0, 1, 0, 1)

var COLOR_BLUE -> color(0, 0, 1, 1)

void vector2(x, y)

Name
Type

x

float

y

float

void vector3(x, y, z)

Name
Type

x

float

y

float

z

float

  • vector2 functions

vector2 add(vector2) -> vector2

vector2 subtract(vector2) -> vector2

vector2 multiply_scalar(float) -> vector2

vector2 multiply_vector(vector2) -> vector2

vector2 divide_scalar(float) -> vector2

vector2 divide_vector(vector2) -> vector2

vector2 divide_vector(vector2) -> vector2

vector2 length() -> float

vector2 distance(vector2) -> float

vector2 out_of_screen(vector2) -> bool

vector2 lerp(vector2, float) -> vector2

vector2 unpack() -> table

vector2 type() -> string

  • vector3 functions

vector3 add(vector3) -> vector3

vector3 subtract(vector3) -> vector3

vector3 multiply_scalar(float) -> vector3

vector3 multiply_vector(vector3) -> vector3

vector3 divide_scalar(float) -> vector3

vector3 divide_vector(vector3) -> vector3

vector3 divide_vector(vector3) -> vector3

vector3 length() -> float

vector3 distance(vector3) -> float

vector3 unit() -> vector3

vector3 normalize() -> vector3

vector3 cross_product(vector3) -> vector3

vector3 look_vector(vector3) -> vector3

vector3 is_zero() -> bool

vector3 lerp(vector3, float) -> vector3

vector3 unpack() -> table

vector3 type() -> string

  • color functions

color hex(uint32_T) -> color

color int(int, int, int, int) -> color

color to_hex() -> uint32_t

color to_hex_string() -> string

color unpack() -> table

color type() -> string

Example

Last updated