소스 검색

WARNING: REVIEWED: Follow a set of conventions

CONVENTIONS:
  - Functions are always self-contained, no function use another raymath function inside, required code is directly re-implemented inside
  - Functions input parameters are always received by value
  - Functions use always a "result" variable for return
  - Functions are always defined inline
  - Angles are always in radians (DEG2RAD/RAD2DEG macros provided for convenience)
pull/2030/head
Ray 4 년 전
부모
커밋
239c37246a
3개의 변경된 파일433개의 추가작업 그리고 162개의 파일을 삭제
  1. +0
    -3
      examples/core/core_quat_conversion.c
  2. +3
    -3
      examples/textures/textures_poly.c
  3. +430
    -156
      src/raymath.h

+ 0
- 3
examples/core/core_quat_conversion.c 파일 보기

@ -69,9 +69,6 @@ int main(void)
m3 = QuaternionToMatrix(q1);
v2 = QuaternionToEuler(q1);
v2.x *= DEG2RAD;
v2.y *= DEG2RAD;
v2.z *= DEG2RAD;
m4 = MatrixRotateZYX(v2);
//--------------------------------------------------------------------------------------

+ 3
- 3
examples/textures/textures_poly.c 파일 보기

@ -53,7 +53,7 @@ int main(void)
Texture texture = LoadTexture("resources/cat.png");
float ang = 0;
float angle = 0.0f;
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
//--------------------------------------------------------------------------------------
@ -63,11 +63,11 @@ int main(void)
{
// Update
//----------------------------------------------------------------------------------
ang++;
angle++;
Vector2 positions[MAX_POINTS] = { 0 };
for (int i = 0; i < MAX_POINTS; i++) positions[i] = Vector2Rotate(points[i], ang);
for (int i = 0; i < MAX_POINTS; i++) positions[i] = Vector2Rotate(points[i], angle*DEG2RAD);
//----------------------------------------------------------------------------------
// Draw

+ 430
- 156
src/raymath.h
파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
파일 보기


불러오는 중...
취소
저장