瀏覽代碼

Remove redundant axis length calculation (#3900)

pull/3901/head
jtainer 8 月之前
committed by GitHub
父節點
當前提交
1b14c082ed
沒有發現已知的金鑰在資料庫的簽署中 GPG 金鑰 ID: B5690EEEBB952194
共有 1 個檔案被更改,包括 1 行新增2 行删除
  1. +1
    -2
      src/raymath.h

+ 1
- 2
src/raymath.h 查看文件

@ -2338,8 +2338,7 @@ RMAPI Quaternion QuaternionFromAxisAngle(Vector3 axis, float angle)
float ilength = 0.0f;
// Vector3Normalize(axis)
Vector3 v = axis;
length = sqrtf(v.x*v.x + v.y*v.y + v.z*v.z);
length = axisLength;
if (length == 0.0f) length = 1.0f;
ilength = 1.0f/length;
axis.x *= ilength;

Loading…
取消
儲存