| 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 | 4171 | static constexpr float asFloat() { | ||
| 14 | 4171 | return (float)num / den; | ||
| 15 | } | |||
| 16 | }; | |||
| 17 | ||||
| 18 | } // namespace efi | |||
| 19 |