The section formula finds the point that splits a segment in a given ratio. You will write it, find the points of trisection, and then run it backwards to find a ratio.
The idea. . For a point already on the segment, the ratio is , as long as the segment is not vertical.
Your tasks.
divide, return the point that divides a to b in the ratio m : n.thirds with the two points of trisection of to .ratio, return for a point p on the segment from a to b.Have you tried it?
Do the tasks in the editor first, and run the checker after each one. Its hints help when a check fails. When you are ready, compare your code with this solution.
Log in to join the discussion.
Loading…