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
ahmed sami
NA
64
200.6k
the distance from a point to a line
Nov 30 2012 6:26 AM
Write a function to calculate the distance from a point to a line. The formula describing the line is: Ax + By + C = 0. If the coordinates of the point P are ( 0 x , 0 y ), the distance d from the point P to the line can be calculated by:
(the rar file)
The function calculates and returns the distance from (x0, y0) to the line described by coefficients A, B and C.
Example:
The distance from (-2, 1.5) to the line described by 2x + 3.5y - 4 = 0 is found by:
dist = distance(2, 3.5, -4, -2, 1.5);
Attachment:
untitled.rar
Reply
Answers (
1
)
decrypting a db column
what is an abstract base class?