[Feat] Point Properties: Normalization #9
Labels
Feature addition
Lable for a new Feature Addition
good first issue
Good for newcomers
JWOC
Role for JWOC contributors.
Medium
Medium tag for JWOC contributors.
Title: Normalize a point vector to a unit vector
Description:
Implement a
normalize()
function for thePoint
class to return a normalized version of the point vector (unit vector). Handle the case where the magnitude is zero.Function Signature:
File: Point.hpp
Class: Point
Acceptance Criteria:
Add the normalize() function to the Point class.
Ensure the function works for points of any dimension.
Handle the case where the magnitude is zero by throwing an exception or returning a meaningful error.
Write unit tests to verify the correctness of the implementation.
The text was updated successfully, but these errors were encountered: