- Main Page
- Packages
- Classes
- Files
- Related Pages

- Class List
- Class Hierarchy
- Class Members

# smjg.libs.sdwf.geometry.Vector Union Reference

The smjg.libs.sdwf.geometry.Vector union represents a vector in two dimensions defined by integer coordinates. More...

List of all members.

## Public Member Functions
Properties
string | toString ()
| Returns a string representation of this Vector.
Operators
Vector | opNeg ()
| Negates this vector.
Vector | opAdd (Vector v)
| Adds another vector to this one.
Point | opAdd (Point p)
| Adds this vector to a point.
Vector | opSub (Vector v)
| Subtracts another vector from this one.
Vector | opMul (int mul)
| Multiplies this vector by a scalar.
Vector | opDiv (int div)
| Divides this vector by a scalar.
Vector | opMod (int mod)
| Calculates the remainder ater dividing each component of the vector by a scalar.
Vector | opMod (Vector mod)
| Calculates the element-wise remainder after division of this vector by another.
Vector | opAddAssign (Vector v)
Vector | opSubAssign (Vector v)
Vector | opMulAssign (int mul)
Vector | opDivAssign (int div)
Vector | opModAssign (int mod)
Vector | opModAssign (Vector mod)
## Static Public Member Functions
static Vector | opCall (int x, int y)
| Constructs a Vector with the given components.
## Public Attributes
SIZE | sz
| This vector as a Windows `SIZE` structure.
int | x
int | y

## Detailed Description

The smjg.libs.sdwf.geometry.Vector union represents a vector in two dimensions defined by integer coordinates.

This type is a wrapper around the Windows API `SIZE` structure.

## Member Function Documentation

static Vector smjg.libs.sdwf.geometry.Vector.opCall | ( | int | x,
|  | int | y |
| ) |  |  | `[static]`

Constructs a Vector with the given components.

Returns:
  the newly constructed Vector.

string smjg.libs.sdwf.geometry.Vector.toString | ( |  | ) |

Returns a string representation of this Vector.

Returns:
  string representation in form (x, y).

Since:
  0.4

Status:
  test

Vector smjg.libs.sdwf.geometry.Vector.opNeg | ( |  | ) |

Negates this vector.

Returns:
  the negative of this vector.

Since:
  0.5

Vector smjg.libs.sdwf.geometry.Vector.opAdd | ( | Vector | v | ) |

Adds another vector to this one.

Returns:
  the sum of this vector and v.

Point smjg.libs.sdwf.geometry.Vector.opAdd | ( | Point | p | ) |

Adds this vector to a point.

Returns:
  the sum of this vector and p.

Vector smjg.libs.sdwf.geometry.Vector.opSub | ( | Vector | v | ) |

Subtracts another vector from this one.

Returns:
  the difference of this vector and v.

Vector smjg.libs.sdwf.geometry.Vector.opMul | ( | int | mul | ) |

Multiplies this vector by a scalar.

Returns:
  this vector multiplied by mul.

Vector smjg.libs.sdwf.geometry.Vector.opDiv | ( | int | div | ) |

Divides this vector by a scalar.

Returns:
  this vector divided by div.

Vector smjg.libs.sdwf.geometry.Vector.opMod | ( | int | mod | ) |

Calculates the remainder ater dividing each component of the vector by a scalar.

Returns:
  a vector in which each component is the remainder after dividing the respective component in this vector by mod.

Vector smjg.libs.sdwf.geometry.Vector.opMod | ( | Vector | mod | ) |

Calculates the element-wise remainder after division of this vector by another.

Returns:
  a vector in which each component is the remainder after dividing the respective component in this vector by that in mod.

Vector smjg.libs.sdwf.geometry.Vector.opAddAssign | ( | Vector | v | ) |

Vector smjg.libs.sdwf.geometry.Vector.opSubAssign | ( | Vector | v | ) |

Vector smjg.libs.sdwf.geometry.Vector.opMulAssign | ( | int | mul | ) |

Vector smjg.libs.sdwf.geometry.Vector.opDivAssign | ( | int | div | ) |

Vector smjg.libs.sdwf.geometry.Vector.opModAssign | ( | int | mod | ) |

Vector smjg.libs.sdwf.geometry.Vector.opModAssign | ( | Vector | mod | ) |

## Member Data Documentation

int smjg.libs.sdwf.geometry.Vector.x

int smjg.libs.sdwf.geometry.Vector.y

SIZE smjg.libs.sdwf.geometry.Vector.sz

This vector as a Windows `SIZE` structure.

The documentation for this union was generated from the following file:

- geometry.d