080_anonymous_structs.patch 472 B

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