浏览代码

fix y-offset casting (#5556)

pull/5561/head
Thomas Anderson 1周前
committed by GitHub
父节点
当前提交
b210d16597
找不到此签名对应的密钥 GPG 密钥 ID: B5690EEEBB952194
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. +1
    -1
      examples/shapes/shapes_colors_palette.c

+ 1
- 1
examples/shapes/shapes_colors_palette.c 查看文件

@ -45,7 +45,7 @@ int main(void)
for (int i = 0; i < MAX_COLORS_COUNT; i++) for (int i = 0; i < MAX_COLORS_COUNT; i++)
{ {
colorsRecs[i].x = 20.0f + 100.0f *(i%7) + 10.0f *(i%7); colorsRecs[i].x = 20.0f + 100.0f *(i%7) + 10.0f *(i%7);
colorsRecs[i].y = 80.0f + 100.0f *((float)i/7) + 10.0f *((float)i/7);
colorsRecs[i].y = 80.0f + 100.0f *((int)i/7) + 10.0f *((float)i/7);
colorsRecs[i].width = 100.0f; colorsRecs[i].width = 100.0f;
colorsRecs[i].height = 100.0f; colorsRecs[i].height = 100.0f;
} }

正在加载...
取消
保存