CengBall: API (documented for version: v0.5)

vector2D Class

Method name Parameters Return Description
vector2D none constructor This class represents a vector in 2D. Constructor of vector2D class. Initial values for x : 1, y : 1.
vector2D double, double constructor Constructor of vector2D class specifying the x and y values of the vector.
add vector2D vector2D Adds the vector with the given vector.
clone none vector2D Creates a copy of the vector2D object and returns it.
dot vector2D double Calculates the dot product of the vector with the given vector.
getAngle none double Gets the angle of the vector.
getMagnitude none double Gets the magnitude of the vector.
getPosAngle none double Gets the positive value of the angle of the vector.
getX none double Gets the value in x axis.
getY none double Gets the value in y axis.
measureDistance vector2D double Calculates the distance between two vectors.
multiply double vector2D Multiplies the vector with the given constant.
normalize none vector2D Normalizes the vector.
setX double void Sets the value in x axis.
setY double void Sets the value in y axis.
subtract vector2D vector2D Subtracts the given vector from this one.
toPoint none Double Transforms this vector to a Point2D.
toString none String Properties of class object is returned for human reading. (Logging purposes)
calculateAngle vector2D, vector2D double Calculates the angle between two vector.

Attribute type Attribute name Description
none none Can not be reached any attribute of this.

TODO

News from CengBall

Quick Tutorial

How to set jdk path
How to import code

Twitter

    Follow @cengball

    © Copyright - Project 11