Point()
Point class is used to define a geometric point
Parameter | Type | Description |
---|---|---|
x | Number | The x property of the point |
y | Number | The y property of the point |
Point's constructor
Converts the current instance to a string
Ex.: Point(12.05,15.17)
Creates a copy of the current instance
Adds the given point's values to the current instance without modifying the current instance
Substracts the given point's values from the current instance without modifying the current instance
Multiplies the values of the current instance by the given point's values or by just a number without modifying the current instance
Divides the values of the current instance by the given point's values or by just a number without modifying the current instance
Rounds the values of the current instance to the closest integer without modifying the current instance
Rounds the values of the current instance to the largest previous integer without modifying the current instance
Compares the values of the current instance with another's
Calculates the distance between the current point and another
Point class is used to define a geometric point
Parameter | Type | Description |
---|---|---|
x | Number | The x property of the point |
y | Number | The y property of the point |
Converts the current instance to a string
Ex.: Point(12.05,15.17)
Creates a copy of the current instance
Adds the given point's values to the current instance without modifying the current instance
Parameter | Type | Description |
---|---|---|
point | Point | The point whose values will be added |
Substracts the given point's values from the current instance without modifying the current instance
Parameter | Type | Description |
---|---|---|
point | Point | The point whose values will be substracted |
Multiplies the values of the current instance by the given point's values or by just a number without modifying the current instance
Parameter | Type | Description |
---|---|---|
val | Point | Number | The point or the number whose values will be multiplied |
Divides the values of the current instance by the given point's values or by just a number without modifying the current instance
Parameter | Type | Description |
---|---|---|
val | Point | Number | The point or the number whose value will be the divisor |
Rounds the values of the current instance to the closest integer without modifying the current instance
Rounds the values of the current instance to the largest previous integer without modifying the current instance
Compares the values of the current instance with another's
Parameter | Type | Description |
---|---|---|
other | Point | The point with which the comparison is done |
tollerance | Number | If specified checks quality considering the tollerance. |
true
, the values are equal
Calculates the distance between the current point and another
Parameter | Type | Description |
---|---|---|
other | Point | The point to which the distance will be calculated |