Clean up raymath include. Fix operators, whitespace.

Fixes #80
This commit is contained in:
Rob Loach
2020-11-12 07:55:16 -05:00
parent 51d9ac51a1
commit e2fd59de10
16 changed files with 104 additions and 52 deletions

View File

@@ -25,23 +25,15 @@
#ifndef RAYLIB_CPP_INCLUDE_VECTOR4_HPP_
#define RAYLIB_CPP_INCLUDE_VECTOR4_HPP_
#ifdef __cplusplus
extern "C" {
#endif
#include "raylib.h" // NOLINT
#ifndef RAYLIB_CPP_NO_MATH
#include "raymath.h" // NOLINT
#endif
#ifdef __cplusplus
}
#endif
#include "./raylib-cpp-utils.hpp"
#ifndef RAYLIB_CPP_NO_MATH
#include <cmath>
#include <utility>
#endif
#include "./raylib.hpp"
#include "./raymath.hpp"
#include "./raylib-cpp-utils.hpp"
namespace raylib {
class Vector4 : public ::Vector4 {
public:
@@ -171,6 +163,10 @@ class Vector4 : public ::Vector4 {
return ::ColorFromNormalized(*this);
}
operator Color() {
return ColorFromNormalized();
}
protected:
inline void set(::Vector4 vec4) {
x = vec4.x;