Difference between revisions of "Manuals/calci/DISTANCE"

From ZCubes Wiki
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...")
 
 
(14 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<div id="6SpaceContent" class="zcontent" align="left">
+
<div style="font-size:30px">'''DISTANCE (Point1,Point2)'''</div><br/>
 +
*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.
  
'''DISTANCE'''(point1,point2)
+
== Description ==
  
where
+
DISTANCE(Point1,Point2)
  
'''point1''' is any point with coordinates[x1,y1]
+
For Example,
 +
DISTANCE([2,3],[6,7]) ''returns 5.656854249492381''
  
'''point2''' is any point with coordinates[x2,y2]
+
*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
  
</div>
+
*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.
<div id="1SpaceContent" class="zcontent" align="left">
 
  
DISTANCE function returns the distance between two points.
+
== Examples ==
  
Formula:
+
<div id="2SpaceContent" class="zcontent" align="left">
  
DISTANCE = sqrt( (x2-x1)^2  + (y2-y1)^2 )
+
{| id="TABLE3" class="SpreadSheet blue"
 +
|- class="even"
 +
| class="sshl_f" | '''DISTANCE()'''
 +
| class="sshl_f" | '''Output'''
 +
 
 +
|- class="odd"
 +
| class="sshl_f" | ([4,8],[3,6])
 +
| class="sshl_f" | 2.23606797749979
  
</div>
+
|- class="even"
----
+
| class="sshl_f    " | ([-4,2],[7,-3])
<div id="7SpaceContent" class="zcontent" align="left">
+
| class="sshl_f    " | 12.083045973594572
  
DISTANCE returns NaN if any of x1,y1,x2,y2 is not real .
+
|- class="odd"
 +
| class="sshl_f    " | ([-2,-3],[-3,-2])
 +
| class="sshl_f    " | 1.4142135623730951
 +
 +
|- class="even"
 +
| class="sshl_f    " | ([10,0],[3,6])
 +
| class="sshl_f    " | 9.219544457292887
 +
|}
  
</div>
+
==Related Videos==
----
 
<div id="12SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="left">
 
  
DISTANCE
+
{{#ev:youtube|iEXubxewpkQ|280|center|DISTANCE}}
  
</div></div>
+
== See Also ==
----
 
<div id="8SpaceContent" class="zcontent" align="left">
 
  
Lets see an example in (Column2Row1)
+
*[[Manuals/calci/DEGREES | DEGREES]]
 +
*[[Manuals/calci/RADIANS | RADIANS]]
 +
*[[Manuals/calci/CIRCLE | CIRCLE]]
  
<nowiki>=DISTANCE([Column1Row1,Column1Row2],[Column1Row3,Column1Row4])</nowiki>
+
==References==
  
Returns 1.414214 for DISTANCE([2,3],[3,4])
+
*[http://en.wikipedia.org/wiki/Distance Distance]
  
</div>
 
----
 
<div id="10SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify">Syntax </div><div class="ZEditBox"><center></center></div></div>
 
----
 
<div id="4SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify">Remarks </div></div>
 
----
 
<div id="3SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify">Examples </div></div>
 
----
 
<div id="11SpaceContent" class="zcontent" align="left"><div class="ZEditBox" align="justify">Description </div></div>
 
----
 
<div id="2SpaceContent" class="zcontent" align="left">
 
  
{| id="TABLE3" class="SpreadSheet blue"
 
|+ Default Calci
 
|- class="even"
 
| class=" " |
 
| Column1
 
| Column2
 
| Column3
 
| Column4
 
|- class="odd"
 
| class=" " | Row1
 
| 2
 
| class="sshl_f" | 1.414214
 
| class="                    sshl_f" |
 
| class="sshl_f  sshl_f    " |
 
|- class="even"
 
| class="  " | Row2
 
| 3
 
| class="sshl_f    SelectTD1 ChangeBGColor SelectTD1" |
 
<div id="2Space_Handle" class="zhandles" title="Click and Drag to resize CALCI Column/Row/Cell. It is EZ!"></div><div id="2Space_Copy" class="zhandles" title="Click and Drag over to AutoFill other cells."></div><div id="2Space_Drag" class="zhandles" title="Click and Drag to Move/Copy Area.">[[Image:copy-cube.gif]]  </div>
 
| class=" sshl_f" |
 
| class="sshl_f  sshl_f    " |
 
|- class="odd"
 
| Row3
 
| class=" " | 3
 
| class="sshl_f            " |
 
| class="sshl_f    " |
 
| class="sshl_f    " |
 
|- class="even"
 
| Row4
 
| class=" " | 4
 
| class="sshl_f    " |
 
| class="sshl_f    " |
 
| class="  " |
 
|- class="odd"
 
| class=" " | Row5
 
|
 
| class="  " |
 
| class="sshl_f    " |
 
| class="  " |
 
|- class="even"
 
| Row6
 
|
 
|
 
| class="sshl_f    " |
 
| class="  " |
 
|}
 
  
{|
+
*[[Z_API_Functions | List of Main Z Functions]]
| <span align="left">[[Image:calci1.gif]]</span>
 
|
 
|
 
[[Image:bold.gif]]
 
|
 
[[Image:italic.gif]]
 
|
 
[[Image:normal.gif]]
 
|
 
[[Image:underline.gif]]
 
|
 
[[Image:border.gif]]
 
|
 
[[Image:numbers.gif]]
 
|
 
[[Image:sort.gif]]
 
|
 
[[Image:formatcells.gif]]
 
|
 
[[Image:graphs.gif]]
 
| $
 
|}
 
  
</div>
+
*[[ Z3 |  Z3 home ]]
----
 

Latest revision as of 14: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.

Examples

DISTANCE() Output
([4,8],[3,6]) 2.23606797749979
([-4,2],[7,-3]) 12.083045973594572
([-2,-3],[-3,-2]) 1.4142135623730951
([10,0],[3,6]) 9.219544457292887

Related Videos

DISTANCE

See Also

References