GCC Code Coverage Report


Directory: ./
File: firmware/util/math/efi_ratio.h
Date: 2025-10-03 00:57:22
Coverage Exec Excl Total
Lines: 75.0% 6 0 8
Functions: 75.0% 3 0 4
Branches: -% 0 0 0
Decisions: -% 0 - 0

Line Branch Decision Exec Source
1 #pragma once
2
3 namespace efi {
4
5 template <int TNum, int TDenom = 1>
6 struct ratio {
7 static constexpr int num = TNum;
8 static constexpr int den = TDenom;
9
10 // A ratio type representing the reciprocal of this type.
11 using recip = ratio<den, num>;
12
13 4164 static constexpr float asFloat() {
14 4164 return (float)num / den;
15 }
16 };
17
18 } // namespace efi
19