This post has been de-listed
It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.
i've tried to calculate the hypotenuse between 2 points using this line:
"double distanceXY = (Math.Sqrt((Math.Pow((deltaX), 2)) Math.Pow((deltaY), 2)));"
but it keeps giving me the root of a single delta^2 rather than adding both and then rooting them. i searched the web a bit and someone reccomended this line:
"double distanceXY = (Math.Sqrt((Math.Pow(Math.Abs(point2X - point1X), 2)) Math.Pow(Math.Abs(point2Y - point1Y), 2)));"
im interested to know why the first does no work and the second does because i think both should work properly.
any help would be appreciated :)
Subreddit
Post Details
- Posted
- 6 years ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/learncsharp...