Nick: so now it is time to make use of the voronoi diagram. To begin, I want to calculate the average slope of the edges of each cell ChatGPT: The slope of a line is typically calculated as the difference in the y-coordinates of two points divided by the difference in the x-coordinates of thoseContinue reading “Dyson Hatching Golden Ticket”
Tag Archives: C++17
About C++ Programming, with ChatGPT.
Hello, if I asked you to teach me C++ from A to Z, how would you proceed? ChatGPT: Sure, I’d be glad to help you learn C++! Learning a programming language like C++ is a multi-step process that involves understanding the basics of the language, practicing coding, and building projects to apply your skills. Here’sContinue reading “About C++ Programming, with ChatGPT.”
Structured Bindings and replacing by reference
C++ 17 has Structured Bindings, what they do is create a temporary object and provide access to the object’s members locally. What happens is we create a temporary S object, and then copy the values memberwise into the binding structure. x now equals 5 and b equals 3.2. the S instance goes away. Since functionsContinue reading “Structured Bindings and replacing by reference”
Fold Expressions and Lamda Overloads
C++17 has a powerful template feature – Fold Expressions – that combines with a C++11 feature – Parameter Pack. This allows us to do away with C-style variable arguments (variadic functions). I introduce Lamda Overloading as well, to work with these two concepts in a wonderful way. First off, the Parameter Pack. This is aContinue reading “Fold Expressions and Lamda Overloads”