소스 검색

Fix inverse length in Vector2Normalize (#2189)

Following the pattern in Vector3Normalize.
pull/2194/head
HarriP 3 년 전
committed by GitHub
부모
커밋
3cb4ef2599
No known key found for this signature in database GPG 키 ID: 4AEE18F83AFDEB23
1개의 변경된 파일3개의 추가작업 그리고 2개의 파일을 삭제
  1. +3
    -2
      src/raymath.h

+ 3
- 2
src/raymath.h 파일 보기

@ -328,8 +328,9 @@ RMAPI Vector2 Vector2Normalize(Vector2 v)
if (length > 0)
{
result.x = v.x*1.0f/length;
result.y = v.y*1.0f/length;
float ilength = 1.0f / length;
result.x = v.x * ilength;
result.y = v.y * ilength;
}
return result;

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