TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
meena moon
NA
39
8.8k
point in c#
Feb 11 2016 4:12 PM
I have this code ,I want to send pt1 and pt2 when click on button to method I have problem in prototype of pt1 and pt2 what is the change I should to do ?
public double angleOf(Point p1, Point p2)
{
double deltaY = (p2.Y - p1.Y);
double deltaX = (p2.X - p1.X);
double result = Math.Atan2(deltaY, deltaX);
result *= (180 / Math.PI);
result += 22.5;
return (result < 0) ? (360d + result) : result;
}
private void button1_Click(object sender, EventArgs e)
{
double angle;
Point pt1 = 4428900.38515348;
Point pt2 = 4428900.38515346;
angle = angleOf(pt1, pt2);
textBox1.Text += angle;
Reply
Answers (
9
)
MCSD Certification
Uniqueness between 3 fields