Using Sin-1 or inverse sin in python

前端 未结 3 1497
忘掉有多难
忘掉有多难 2021-01-22 09:24

Here is my code:

# point of intersection between opposite and hypotenuse

x,y  =    pygame.mouse.get_pos()


# using formula for length of line

lenline1 = (x-x)         


        
3条回答
  •  深忆病人
    2021-01-22 09:49

    Don't bother with the k computation, its meaningless.

    j = math.asin(PQ)
    

    However, this only works for right-angled triangles and you have to appropriate side lengths in the right places. In general this will not work and you need to use the dot product method.

提交回复
热议问题