Search⌘ K

Challenge: Coordinates of a Point

Explore how to define a two-dimensional Point struct with X and Y coordinates in Go. Learn to implement methods like Abs to calculate the vector length and Scale to multiply coordinates by a factor. This lesson deepens your understanding of structs and methods through a practical coding challenge.

We'll cover the following...

Problem statement

Define a 2 dimensional Point with coordinates X and Y as a struct. Implement a ...