Class Vector_2
java.lang.Object
Jcg.geometry.Vector_2
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturn the vector difference (v-u), where u is the current vectorintReturn the dimension of the spaceReturn a new vector obtained by scalar divisionbooleangetCartesian(int i) return the i-th cartesian coordinate of the pointgetX()getY()Return the inner product of two vectorsReturn a new vector obtained by multiplying by a scalaropposite()Return the opposite of the current vectorvoidsetCartesian(int i, Number x) set the i-th cartesian coordinatevoidvoidReturn the square length of a vectorReturn the vector sum (v+u), where u is the current vectortoString()Return a String representing vector coordinates
-
Field Details
-
x
-
y
-
-
Constructor Details
-
Vector_2
public Vector_2() -
Vector_2
-
Vector_2
-
-
Method Details
-
getX
-
getY
-
setX
-
setY
-
equals
-
toString
-
dimension
-
getCartesian
Description copied from interface:Vector_return the i-th cartesian coordinate of the point- Specified by:
getCartesianin interfaceVector_
-
setCartesian
Description copied from interface:Vector_set the i-th cartesian coordinate- Specified by:
setCartesianin interfaceVector_
-
sum
-
difference
Description copied from interface:Vector_Return the vector difference (v-u), where u is the current vector- Specified by:
differencein interfaceVector_
-
opposite
-
innerProduct
Description copied from interface:Vector_Return the inner product of two vectors- Specified by:
innerProductin interfaceVector_
-
divisionByScalar
Description copied from interface:Vector_Return a new vector obtained by scalar division- Specified by:
divisionByScalarin interfaceVector_
-
multiplyByScalar
Description copied from interface:Vector_Return a new vector obtained by multiplying by a scalar- Specified by:
multiplyByScalarin interfaceVector_
-
squaredLength
Description copied from interface:Vector_Return the square length of a vector- Specified by:
squaredLengthin interfaceVector_
-
perpendicular
-