magnitude property

double get magnitude

Distance from origin (vector magnitude)

Implementation

double get magnitude => sqrt(x * x + y * y);