How to calculate the angle between the straight lines formed by three lines

in the Cartesian coordinate system, how to calculate the rotation angle of two lines connected by two points and 0 in Cartesian coordinate system, that is, how to realize this method

, it returns a negative number counterclockwise, that is,-180 degrees
how to realize this method

getAngle (x1, y1, x2, y2, x3, y3) {
  
}

getAngle(0,0,0,-1,0,1)
//  -180

getAngle(0,0,0,-1,-1,-1)
//  45
Feb.28,2021

$$ Arccos (\ frac {(x_2-x_1) * (x_3-x_1) + (y_2-y_1) * (y_3-y_1)} {\ sqrt {(x_2-x_1) ^ 2 + (y_2-y_1) ^ 2} *\ sqrt {(x_3-x_1) ^ 2 + (y_3-y_1) ^ 2}}) $


now that you know the coordinates of the two points,

 
  yes=>180
  no=>
      => 
      

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3043c-2bd08.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3043c-2bd08.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?