Public Method Details |
Science_Chemistry_Coordinates |
|
public object Science_Chemistry_Coordinates Science_Chemistry_Coordinates( array $coords )
|
| |
Constructor for the class, returns null if parameter is
not an array with 3 entries
|
| Parameter |
|
| array |
$coords |
|
|
array of three floats (x, y, z) |
|
| Returns |
object Science_Chemistry_Coordinates |
|
distance |
|
public float distance( object Science_Chemistry_Coordinates $coord )
|
| |
Castesian distance calculation method
|
| Parameter |
|
| object Science_Chemistry_Coordinates |
$coord |
|
|
|
|
| Returns |
float distance |
|
areCoordinates |
|
public boolean areCoordinates( object Science_Chemistry_Coordinates $obj )
|
| |
Checks if the object is an instance of Science_Chemistry_Coordinates
|
| Parameter |
|
| object Science_Chemistry_Coordinates |
$obj |
|
|
|
|
| Returns |
boolean |
|
getCoordinates |
|
public array getCoordinates( )
|
| |
Returns the array of coordinates
|
| Returns |
array array (x, y, z) |
|
toString |
|
public string toString( )
|
| |
Returns a string representation of the coordinates: x y z
|
| Returns |
string |
|
toCML |
|
public string toCML( )
|
| |
Returns a CML representation of the coordinates
|
| Returns |
string |
|