Skip to content

Vectors

Juptian edited this page Oct 13, 2020 · 4 revisions

Vectors

Include for the file

#include "Source/Code/Maths/Math.h"

Vector 2

A vector 2 takes in two floats(x, y) and is used for 2D rendering and placing objects in 2D. You can use:

  • Vector2
  • vector2
  • Vec2
  • vec2

to get the constructors of these functions. They can be printed, compared, multiplied.

Vector 3

A vector 3 will take in three floats(x, y, z), and is used for 3D rendering and placing objects in 3D. You can use:

  • Vector3
  • vector3
  • Vec3
  • vec3

to get the constructors of these functions. They can be printed, compared, multiplied.

Vector 4

A Vector4 will take in four floats(x, y, z, w) and is used for shaders, colors, matrixes. You can use:

  • Vector4
  • vector4
  • Vec4
  • vec4

to get the constructors of these functions. They can be printed, compared, multiplied.

Clone this wiki locally