Skip to content

Commit

Permalink
chore: unsafe_narrow -> unchecked_narrow
Browse files Browse the repository at this point in the history
  • Loading branch information
zaucy committed Oct 29, 2024
1 parent f22c266 commit 2597d9f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/donut/cursed_donut.cpp2
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ main: () = {

t: float = c * h * g - f * e;

x: int = cpp2::unsafe_narrow<int>(40 + 30 * D * (l * h * m - t * n));
x: int = cpp2::unchecked_narrow<int>(40 + 30 * D * (l * h * m - t * n));

y: int = cpp2::unsafe_narrow<int>(12 + 15 * D * (l * h * n + t * m));
y: int = cpp2::unchecked_narrow<int>(12 + 15 * D * (l * h * n + t * m));

o: int = x + 80 * y;

N: int = cpp2::unsafe_narrow<int>(8 * ((f * e - c * d * g) * m - c * d * e - f * g - l * d * n));
N: int = cpp2::unchecked_narrow<int>(8 * ((f * e - c * d * g) * m - c * d * e - f * g - l * d * n));
if 22 > y && y > 0 && x > 0 && 80 > x && D > z[0] {
z[o] = D;
if N > 0 { b[o] = brightness_chars[N % brightness_chars.size()]; }
Expand Down

0 comments on commit 2597d9f

Please sign in to comment.