Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- typedef struct {
- int16_t x, y;
- } p2i16_t; // structure holding the x and y coordinates of a 2d point
- typedef struct {
- float_t x, y;
- } p2f_t; // structure holding the x and y coordinates of a 2d point
- typedef struct {
- double_t x, y;
- } p2d_t; // structure holding the x and y coordinates of a 2d point
- typedef struct {
- quad_t x, y;
- } p2q_t; // structure holding the x and y coordinates of a 2d point
- typedef struct {
- int16_t x, y, z;
- } p3i16_t; // structure holding the x, y, and z coordinates of a int16_t precision 3d point
- typedef struct {
- float_t x, y, z;
- } p3f_t; // structure holding the x, y, and z coordinates of a single precision 3d point
- typedef struct {
- double_t x, y, z;
- } p3d_t; // structure holding the x, y, and z coordinates of a double precision 3d point
- typedef struct {
- quad_t x, y, z;
- } p3q_t; // structure holding the x and y coordinates of a quad precision 3d point
- typedef struct {
- p2i16_t p1, p2;
- } l2i16_t; // structure holding Starting point p1 and endpoint p2 of a 2d line int16_t precision
- typedef struct {
- p2f_t p1, p2;
- } l2f_t; // structure holding Starting point p1 and endpoint p2 of a 2d line float precision
- typedef struct {
- p2d_t p1, p2;
- } l2d_t; // structure holding Starting point p1 and endpoint p2 of a 2d line double precision
- typedef struct {
- p2q_t p1, p2;
- } l2q_t; // structure holding Starting point p1 and endpoint p2 of a 2d line quad precision
- typedef struct {
- p3i16_t p1, p2;
- } l3i16_t; // structure holding Starting point p1 and endpoint p2 of a 3d line float precision
- typedef struct {
- p3f_t p1, p2;
- } l3f_t; // structure holding Starting point p1 and endpoint p2 of a 3d line float precision
- typedef struct {
- p3d_t p1, p2;
- } l3d_t; // structure holding Starting point p1 and endpoint p2 of a 3d line double precision
- typedef struct {
- p3q_t p1, p2;
- } l3q_t; // structure holding Starting point p1 and endpoint p2 of a 3d line quad precision
- typedef struct {
- double_t radius, theta;
- } v2d_t; // a 2d vector with radius and angle
- // a vector with offset
- typedef struct {
- p2d_t o; // origo / offset
- double_t radius, theta; // vector component
- } v2do_t; // a 2d vector with radius and angle
- typedef struct {
- float_t radius, theta;
- } v2f_t; // a 2d vector with radius and angle
- typedef struct {
- double_t radius, thetax, thetay, thetaz;
- } v3d_t; // a 3d vector with radius and 3 angles
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement