Class 2 - Find the Torsional Angle

  • + 0 comments

    When you say 'Points()' you are instantiating a Points object or casting the arguments into one.

    In the main function that is used used to turn the scalars in the points[] array into Points objects a, b, c, and d

    In the return statements in the class methods, it's being used to turn the three scalar values into a Points object to be returned. That's what makes x and y into Points objects in the main function.

    Whoever wrote this problem made it potentially super-confusing by using 'points' as the identifier for an array of arrays of integers instead of an array of Points objects.