mirror of
https://github.com/recp/cglm.git
synced 2025-12-24 12:32:40 +00:00
Add a vec2s struct type for consistency
There's a vec2 type, so there should probably be a struct version of it too. Even if no functions use it right now, if a library user (like me) needs a 2-element vector, they don't need to roll their own.
This commit is contained in:
@@ -10,6 +10,16 @@
|
||||
|
||||
#include "types.h"
|
||||
|
||||
typedef union vec2s {
|
||||
#ifndef CGLM_NO_ANONYMOUS_STRUCT
|
||||
struct {
|
||||
float x;
|
||||
float y;
|
||||
};
|
||||
#endif
|
||||
vec2 raw;
|
||||
} vec2s;
|
||||
|
||||
typedef union vec3s {
|
||||
#ifndef CGLM_NO_ANONYMOUS_STRUCT
|
||||
struct {
|
||||
|
||||
Reference in New Issue
Block a user