Difference between revisions of "Manuals/calci/DISTANCE"
Jump to navigation
Jump to search
(11 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
− | =DISTANCE( | + | <div style="font-size:30px">'''DISTANCE (Point1,Point2)'''</div><br/> |
− | + | *Where 'Point1' is any point with coordinates[x1,y1] and | |
− | *Where ' | + | *'Point2' is any point with coordinates[x2,y2] |
− | *' | + | **DISTANCE(), returns the distance between two points. |
− | |||
− | DISTANCE() | ||
== Description == | == Description == | ||
− | DISTANCE( | + | DISTANCE(Point1,Point2) |
+ | For Example, | ||
DISTANCE([2,3],[6,7]) ''returns 5.656854249492381'' | DISTANCE([2,3],[6,7]) ''returns 5.656854249492381'' | ||
Line 19: | Line 18: | ||
*If any of the co-ordinates (x1,y1,x2,y2) is non-numeric, Calci returns an error message. | *If any of the co-ordinates (x1,y1,x2,y2) is non-numeric, Calci returns an error message. | ||
+ | *If the function is not available, then load the geometry by using 'load geometry' command. | ||
== Examples == | == Examples == | ||
Line 35: | Line 35: | ||
|- class="even" | |- class="even" | ||
| class="sshl_f " | ([-4,2],[7,-3]) | | class="sshl_f " | ([-4,2],[7,-3]) | ||
− | | class="sshl_f " | | + | | class="sshl_f " | 12.083045973594572 |
|- class="odd" | |- class="odd" | ||
| class="sshl_f " | ([-2,-3],[-3,-2]) | | class="sshl_f " | ([-2,-3],[-3,-2]) | ||
− | | class="sshl_f " | | + | | class="sshl_f " | 1.4142135623730951 |
− | + | ||
|- class="even" | |- class="even" | ||
| class="sshl_f " | ([10,0],[3,6]) | | class="sshl_f " | ([10,0],[3,6]) | ||
− | | class="sshl_f " | | + | | class="sshl_f " | 9.219544457292887 |
|} | |} | ||
+ | |||
+ | ==Related Videos== | ||
+ | |||
+ | {{#ev:youtube|iEXubxewpkQ|280|center|DISTANCE}} | ||
+ | |||
+ | == See Also == | ||
+ | |||
+ | *[[Manuals/calci/DEGREES | DEGREES]] | ||
+ | *[[Manuals/calci/RADIANS | RADIANS]] | ||
+ | *[[Manuals/calci/CIRCLE | CIRCLE]] | ||
+ | |||
+ | ==References== | ||
+ | |||
+ | *[http://en.wikipedia.org/wiki/Distance Distance] | ||
+ | |||
+ | |||
+ | |||
+ | *[[Z_API_Functions | List of Main Z Functions]] | ||
+ | |||
+ | *[[ Z3 | Z3 home ]] |
Latest revision as of 13:17, 9 May 2019
DISTANCE (Point1,Point2)
- Where 'Point1' is any point with coordinates[x1,y1] and
- 'Point2' is any point with coordinates[x2,y2]
- DISTANCE(), returns the distance between two points.
Description
DISTANCE(Point1,Point2)
For Example, DISTANCE([2,3],[6,7]) returns 5.656854249492381
- This function returns the distance between two points using the following formula -
DISTANCE = SQRT( (x2-x1)^2 + (y2-y1)^2 )
= SQRT((6-2)^2 + (7-3)^2) = SQRT(32) = 5.656854249492381
- If any of the co-ordinates (x1,y1,x2,y2) is non-numeric, Calci returns an error message.
- If the function is not available, then load the geometry by using 'load geometry' command.