Difference between revisions of "Manuals/calci/DISTANCE"
Jump to navigation
Jump to search
(Created page with "<div id="6SpaceContent" class="zcontent" align="left"> '''DISTANCE'''(point1,point2) where '''point1''' is any point with coordinates[x1,y1] '''point2''' is any po...") |
|||
Line 1: | Line 1: | ||
− | + | =DISTANCE(point1,point2)= | |
− | ''' | + | *Where 'point1' is any point with coordinates[x1,y1] and |
+ | *'point2' is any point with coordinates[x2,y2] | ||
− | + | DISTANCE() calculates the distance between two points. | |
− | + | == Description == | |
− | + | DISTANCE(point1,point2) | |
− | + | 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. | |
− | + | == Examples == | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
<div id="2SpaceContent" class="zcontent" align="left"> | <div id="2SpaceContent" class="zcontent" align="left"> | ||
{| id="TABLE3" class="SpreadSheet blue" | {| id="TABLE3" class="SpreadSheet blue" | ||
− | |||
|- class="even" | |- class="even" | ||
− | | class=" " | | + | | class="sshl_f" | '''Function''' |
− | | | + | | class="sshl_f" | '''Distance Output''' |
− | + | ||
− | | | ||
− | |||
|- class="odd" | |- class="odd" | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
| class="sshl_f " | | | class="sshl_f " | | ||
| class="sshl_f " | | | class="sshl_f " | | ||
+ | |||
|- class="even" | |- class="even" | ||
− | |||
− | |||
| class="sshl_f " | | | class="sshl_f " | | ||
| class="sshl_f " | | | class="sshl_f " | | ||
− | + | ||
|- class="odd" | |- class="odd" | ||
− | |||
− | |||
− | |||
| class="sshl_f " | | | class="sshl_f " | | ||
− | | class=" | + | | class="sshl_f " | |
+ | |||
|- class="even" | |- class="even" | ||
− | |||
− | |||
− | |||
| class="sshl_f " | | | class="sshl_f " | | ||
− | | class=" | + | | class="sshl_f " | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|} | |} | ||
− | |||
− | |||
− |
Revision as of 15:56, 20 November 2013
DISTANCE(point1,point2)
- Where 'point1' is any point with coordinates[x1,y1] and
- 'point2' is any point with coordinates[x2,y2]
DISTANCE() calculates the distance between two points.
Description
DISTANCE(point1,point2)
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.
Examples
Function | Distance Output |