
Implement point_distance2, which takes two point structs by value and returns the squared distance between them as a long.
point_distance2({0, 0}, {3, 4})Expected result
25For your own tracking. Tests grade your code.
point_distance2({7, -2}, {7, -2})Expected result
0point_distance2({2, 5}, {9, 5})Expected result
49point_distance2({2000000000, 0}, {-1000000000, 0})Expected result
9000000000000000000Expected files
point_distance.cAllowed functions
None. Write every helper yourself.

Implement point_distance2, which takes two point structs by value and returns the squared distance between them as a long.
point_distance2({0, 0}, {3, 4})Expected result
25For your own tracking. Tests grade your code.
point_distance2({7, -2}, {7, -2})Expected result
0point_distance2({2, 5}, {9, 5})Expected result
49point_distance2({2000000000, 0}, {-1000000000, 0})Expected result
9000000000000000000Expected files
point_distance.cAllowed functions
None. Write every helper yourself.

Run the tests to grade your code
Build your code, then check each test here. Open a result to inspect its output.
v0.40: Create exercises. Challenge the community.
Meet Studio →