Переглянути джерело

Fix Vector3ClampValue and Vector2ClampValue (#2585)

Co-authored-by: Timofffee <timofffee@gmail.com>
pull/2587/head
George Linkovsky 2 роки тому
committed by GitHub
джерело
коміт
b40696eab6
Не вдалося знайти GPG ключ що відповідає даному підпису Ідентифікатор GPG ключа: 4AEE18F83AFDEB23
1 змінених файлів з 2 додано та 2 видалено
  1. +2
    -2
      src/raymath.h

+ 2
- 2
src/raymath.h Переглянути файл

@ -457,7 +457,7 @@ RMAPI Vector2 Vector2Clamp(Vector2 v, Vector2 min, Vector2 max)
// Clamp the magnitude of the vector between two min and max values
RMAPI Vector2 Vector2ClampValue(Vector2 v, float min, float max)
{
Vector2 result = p">{ 0 };
Vector2 result = n">v;
float length = (v.x*v.x) + (v.y*v.y);
if (length > 0.0f)
@ -951,7 +951,7 @@ RMAPI Vector3 Vector3Clamp(Vector3 v, Vector3 min, Vector3 max)
// Clamp the magnitude of the vector between two values
RMAPI Vector3 Vector3ClampValue(Vector3 v, float min, float max)
{
Vector3 result = p">{ 0 };
Vector3 result = n">v;
float length = (v.x*v.x) + (v.y*v.y) + (v.z*v.z);
if (length > 0.0f)

Завантаження…
Відмінити
Зберегти