fix: speed percentage in title is now accurate
We now properly account for full speed being 59.97Hz not, 59Hz or 60Hz
This commit is contained in:
@@ -33,8 +33,8 @@ pub const FpsAverage = struct {
|
||||
self.sample_count += 1;
|
||||
}
|
||||
|
||||
pub fn calc(self: *const Self) u64 {
|
||||
return self.total / self.sample_count;
|
||||
pub fn calc(self: *const Self) f64 {
|
||||
return @intToFloat(f64, std.time.ns_per_s) / (@intToFloat(f64, self.total) / @intToFloat(f64, self.sample_count));
|
||||
}
|
||||
|
||||
fn reset(self: *Self, sample: u64) void {
|
||||
|
Reference in New Issue
Block a user