Task
Implement a Vector class (or a set of functions) that models a Physical Vector. The four basic operations and a pretty print function should be implemented.



The Vector may be initialized in any reasonable way.

 Start and end points, and direction
 Angular coefficient and value (length)


The four operations to be implemented are:

 Vector  +  Vector addition
 Vector  -  Vector subtraction
 Vector  *  scalar multiplication
 Vector  /  scalar division


module Vector =
  struct
    type t = { x : float; y : float }
    let make x y = { x; y }
    let add a b = { x = a.x +. b.x; y = a.y +. b.y }
    let sub a b = { x = a.x -. b.x; y = a.y -. b.y }
    let mul a n = { x = a.x *. n; y = a.y *. n }
    let div a n = { x = a.x /. n; y = a.y /. n }
 
    let to_string {x; y} = Printf.sprintf "(%F, %F)" x y
 
    let ( + ) = add
    let ( - ) = sub
    let ( * ) = mul
    let ( / ) = div
  end
 
open Printf
 
let test () =
  let a, b = Vector.make 5. 7., Vector.make 2. 3. in
  printf "a:    %s\n" (Vector.to_string a);
  printf "b:    %s\n" (Vector.to_string b);
  printf "a+b:  %s\n" Vector.(a + b |> to_string);
  printf "a-b:  %s\n" Vector.(a - b |> to_string);
  printf "a*11: %s\n" Vector.(a * 11. |> to_string);
  printf "a/2:  %s\n" Vector.(a / 2. |> to_string)