080_anonymous_structs.patch 552 B

123456789101112131415161718
  1. --- exercises/080_anonymous_structs.zig 2023-11-21 14:52:54.312749682 +0100
  2. +++ answers/080_anonymous_structs.zig 2023-11-21 14:52:43.909225238 +0100
  3. @@ -48,13 +48,13 @@
  4. // * circle1 should hold i32 integers
  5. // * circle2 should hold f32 floats
  6. //
  7. - const circle1 = ??? {
  8. + const circle1 = Circle(i32){
  9. .center_x = 25,
  10. .center_y = 70,
  11. .radius = 15,
  12. };
  13. - const circle2 = ??? {
  14. + const circle2 = Circle(f32){
  15. .center_x = 25.234,
  16. .center_y = 70.999,
  17. .radius = 15.714,