@ThingworxExtensionApiClass(since={7,1}, canInstantiate=true) public class Vec2 extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
X |
static java.lang.String |
Y |
Constructor and Description |
---|
Vec2() |
Modifier and Type | Method and Description |
---|---|
protected int |
compare(Vec2 v1,
Vec2 v2) |
int |
compareTo(java.lang.Object value) |
static Vec2 |
fromString(java.lang.String value)
Construct a Vec2 from the provided string value. |
double |
getX()
Get the x value. |
double |
getY()
Get the y value. |
boolean |
isDefaultValue()
Check if this Vec2 instance is in its default state. |
void |
setX(double value)
Set the x value. |
void |
setY(double value)
Set the y value. |
java.lang.String |
toString()
Construct a string representation of this Vec2 instance. |
public static final java.lang.String X
public static final java.lang.String Y
@ThingworxExtensionApiMethod(since={7,1}) public double getX()
@ThingworxExtensionApiMethod(since={7,1}) public void setX(double value)
value
- - double value to be set for x@ThingworxExtensionApiMethod(since={7,1}) public double getY()
@ThingworxExtensionApiMethod(since={7,1}) public void setY(double value)
value
- - double value to be set for y@ThingworxExtensionApiMethod(since={7,1}) public int compareTo(java.lang.Object value)
@ThingworxExtensionApiMethod(since={7,1}) protected int compare(Vec2 v1, Vec2 v2)
@ThingworxExtensionApiMethod(since={7,1}) public java.lang.String toString()
toString
in class java.lang.Object
@ThingworxExtensionApiMethod(since={7,1}) public boolean isDefaultValue()
@ThingworxExtensionApiMethod(since={7,1}) public static Vec2 fromString(java.lang.String value)
value
- - String to split by ',' then taking the first result as value for x and the second result as value for y