如何在两个像素角之间找到 [英] How do I find between two pixcel angle
本文介绍了如何在两个像素角之间找到的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嗨。我如何找到两个像素之间的角度...
Hi.How do I find angle between two pixcels...
推荐答案
尝试:
Try:
Point p1 = new Point(100, 100);
Point p2 = new Point(150, 50);
double radians = Math.Atan2(p2.Y - p1.Y, p2.X - p1.X);
Google是你的朋友;)
网上有很多资源。
例如: http:// cplus .about.com / od / learnc / a /计算 - 相对角度 - 两点之间.htm [ ^ ]
Google is your friend ;)
There is a lot of resources about that online.
For example : http://cplus.about.com/od/learnc/a/Calculating-The-Relative-Angle-Between-Two-Points.htm[^]
感觉:两个像素之间没有角度。
你需要至少3个像素,这可以定义两个段;然后你可以测量这些段之间的角度。
请澄清你的问题。
That makes no sense : there is no angle between two pixels.
You need at least 3 pixels, which could define two segments; you can then measure an angle between these segments.
Please clarify your question.
这篇关于如何在两个像素角之间找到的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文