浏览代码

Merge pull request #531 from sherjilozair/patch_implicit_type

Patch implicit type
pull/539/head
Ray 7 年前
committed by GitHub
父节点
当前提交
6884d3bc14
找不到此签名对应的密钥 GPG 密钥 ID: 4AEE18F83AFDEB23
共有 1 个文件被更改,包括 4 次插入4 次删除
  1. +4
    -4
      src/shapes.c

+ 4
- 4
src/shapes.c 查看文件

@ -634,8 +634,8 @@ bool CheckCollisionRecs(Rectangle rec1, Rectangle rec2)
{
bool collision = false;
int dx = abs((rec1.x + rec1.width/2) - (rec2.x + rec2.width/2));
int dy = abs((rec1.y + rec1.height/2) - (rec2.y + rec2.height/2));
float dx = fabsf((rec1.x + rec1.width/2) - (rec2.x + rec2.width/2));
float dy = fabsf((rec1.y + rec1.height/2) - (rec2.y + rec2.height/2));
if ((dx <= (rec1.width/2 + rec2.width/2)) && ((dy <= (rec1.height/2 + rec2.height/2)))) collision = true;
@ -686,8 +686,8 @@ Rectangle GetCollisionRec(Rectangle rec1, Rectangle rec2)
if (CheckCollisionRecs(rec1, rec2))
{
int dxx = abs(rec1.x - rec2.x);
int dyy = abs(rec1.y - rec2.y);
float dxx = fabsf(rec1.x - rec2.x);
float dyy = fabsf(rec1.y - rec2.y);
if (rec1.x <= rec2.x)
{

正在加载...
取消
保存