Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added divide by zero guard for -time

  • Loading branch information...
commit 673dbac9d5ae92b214194277c63e154a2af9ceb1 1 parent f8b02f8
@kthakore kthakore authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  src/04-game.pod
View
2  src/04-game.pod
@@ -200,7 +200,7 @@ read on to the problems below.
else {
# Our frame rate is our Frames * 100 / Time Elapsed in us
- $FPS = int( ( $frames * 100 ) / $delta_time );
+ $FPS = int( ( $frames * 100 ) / $delta_time ) if $delta_time != 0;
# Reset our metrics
$frames = 0;
Please sign in to comment.
Something went wrong with that request. Please try again.