Logo

Programming-Idioms

History of Idiom 5 > diff from v366 to v367

Edit summary for version 367 by programming-idioms.org:
Restored version 365

Version 366

2019-02-08, 15:23:38

Version 367

2019-02-09, 22:01:57

Idiom #5 Create a 2D Point data structure

Declare a container type for two floating-point numbers x and y

Illustration

Idiom #5 Create a 2D Point data structure

Declare a container type for two floating-point numbers x and y

Illustration
Code
typedef struct {
  double x;
  double y;cxcx
} Point;
Code
typedef struct {
  double x;
  double y;
} Point;