Skip to content

UGetAngle(A, B, C = None)

Takes two UPoints and calculate direction vectors from the two points and a conventionnal [0,-1] vector Then calculates the determinant and the dot product of the two vectors, and then compute arc tangent of the resulting vectors. Formula : θ = atan2( ∥u×v∥ , u∙v ) https://www.jwwalker.com/pages/angle-between-vectors.html Returns angles in degrees, and as a convention , if used with classic indexed image array values, when oriented up, a line returns 0 degree (compared to convention). When tilting from that position to the right gives positive angles ,and when tilting left, give negative angles. cf schema : -45° 0° +45° \ | / \ | /

Back to top