Science_Chemistry
[ class tree: Science_Chemistry ] [ index: Science_Chemistry ] [ all elements ]

Class: Science_Chemistry_Coordinates

Source Location: /Science_Chemistry-1.1.2/Science/Chemistry/Coordinates.php

Class Overview


Utility class for defining 3D coordinates and its associated distance() method


Author(s):

Version:

  • 1.0

Methods


Inherited Variables

Inherited Methods


Class Details

[line 31]
Utility class for defining 3D coordinates and its associated distance() method


[ Top ]


Method Detail

Science_Chemistry_Coordinates (Constructor)   [line 49]

object Science_Chemistry_Coordinates Science_Chemistry_Coordinates( array $coords)

Constructor for the class, returns null if parameter is not an array with 3 entries
  • Access: public

Parameters:

array   $coords   —  array of three floats (x, y, z)

[ Top ]

areCoordinates   [line 81]

boolean areCoordinates( object Science_Chemistry_Coordinates $obj)

Checks if the object is an instance of Science_Chemistry_Coordinates
  • Access: public

Parameters:


[ Top ]

distance   [line 63]

float distance( object Science_Chemistry_Coordinates $coord)

Cartesian distance calculation method
  • Return: distance
  • Access: public

Parameters:


[ Top ]

getCoordinates   [line 94]

array getCoordinates( )

Returns the array of coordinates
  • Return: array (x, y, z)
  • Access: public

[ Top ]

toCML   [line 117]

string toCML( )

Returns a CML representation of the coordinates
  • Access: public

[ Top ]

toString   [line 105]

string toString( )

Returns a string representation of the coordinates: x y z
  • Access: public

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:48:16 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.