[Examples] Fix typecast warnings in examples. (#1601)

* Fixing typecast warnings generated by visual studio 2019 in examples.

* Changes to fixes based on feedback

Co-authored-by: Jeffery Myers <JefMyers@blizzard.com>
This commit is contained in:
Jeffery Myers 2021-02-20 14:37:32 -08:00 committed by GitHub
parent 82cdd88ffe
commit 48a7cd3c87
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 57 additions and 54 deletions

View file

@ -140,8 +140,8 @@ int main(void)
// Draw the current buffer state proportionate to the screen
for (int i = 0; i < screenWidth; i++)
{
position.x = i;
position.y = 250 + 50*data[i*MAX_SAMPLES/screenWidth]/32000;
position.x = (float)i;
position.y = 250 + 50*data[i*MAX_SAMPLES/screenWidth]/32000.0f;
DrawPixelV(position, RED);
}