Package jgromacs.data
Class Angle
java.lang.Object
jgromacs.data.Angle
- All Implemented Interfaces:
Cloneable
Objects of this class represent an angle
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()
Returns an identical Angle objectboolean
Returns true if the two angles are identicaldouble
Returns the value of angle in degreesdouble
Returns the value of angle in radiansint
hashCode()
Returns hash codevoid
setInDegrees
(double valueInDegrees) Sets the value of angle in degreesvoid
setInRadians
(double valueInRadians) Sets the value of angle in radianstoString()
Returns the String representation of angle
-
Constructor Details
-
Angle
public Angle()Constructs a new Angle object -
Angle
public Angle(double valueInDegrees) Constructs a new Angle object of given value in degrees- Parameters:
valueInDegrees
- value in degrees
-
-
Method Details
-
getInDegrees
public double getInDegrees()Returns the value of angle in degrees- Returns:
- value in degrees
-
getInRadians
public double getInRadians()Returns the value of angle in radians- Returns:
- value in radians
-
setInDegrees
public void setInDegrees(double valueInDegrees) Sets the value of angle in degrees- Parameters:
valueInDegrees
- value in degrees
-
setInRadians
public void setInRadians(double valueInRadians) Sets the value of angle in radians- Parameters:
valueInRadians
- value in radians
-
equals
Returns true if the two angles are identical -
hashCode
public int hashCode()Returns hash code -
clone
Returns an identical Angle object -
toString
Returns the String representation of angle
-