---
name: "SDLmm_SPoint"
section: "3"
platform: "linux"
package: "libsdl-mm0.1"
version: "0.1.8-4"
release: "Debian 3.0 (Woody)"
platforms: ["linux"]
url: "https://new.carta.tech/SDLmm_SPoint"
---

# SDLmm\_SPoint(3)

A small usefull class representing a point in 2 dimensional space.

## NAME

SDLmm::SPoint - A small usefull class representing a point in 2 dimensional space.

## SYNOPSIS

`#include <sdlmm_spoint.h>`

### Public Methods

**SPoint** ()\
 *Default constructor which creates an empty* **SPoint** *(xy variables set to zero).* **SPoint** (const SPoint &point)\
 *This is the copy constructor. Simply initializes the value of an* **SPoint** *to that of another* **SPoint***.* **SPoint** (Sint16 nx, Sint16 ny)\
 *Constructor which initializes the class from integer values.* SPoint& **operator=** (const SPoint &point)\
 *Set the value of an* **SPoint** *to that of an existing* **SPoint***.* bool **operator==** (const SPoint &point) const\
 *Compare two points for equality.* bool **operator\<** (const SPoint &point) const\
 bool **operator\<=** (const SPoint &point) const\
 bool **operator\>** (const SPoint &point) const\
 bool **operator\>=** (const SPoint &point) const\
 SPoint& **operator+=** (const SPoint &point)\
 SPoint& **operator-=** (const SPoint &point)\
 SPoint **operator+** (const SPoint &point) const\
 SPoint **operator-** (const SPoint &point) const\
 SPoint& **operator \*=** (Sint16 scalar)\
 SPoint& **operator/=** (Sint16 scalar)\
 SPoint **operator \*** (Sint16 scalar) const\
 SPoint **operator/** (Sint16 scalar) const\

### Public Attributes

Sint16 **x**\
 Sint16 **y**\

## DETAILED DESCRIPTION

A small usefull class representing a point in 2 dimensional space.

**Author:**  Adam Gates

## CONSTRUCTOR & DESTRUCTOR DOCUMENTATION

### SDLmm::SPoint::SPoint ()` [inline]`

Default constructor which creates an empty **SPoint** (xy variables set to zero).

### SDLmm::SPoint::SPoint (const SPoint & point)` [inline]`

This is the copy constructor. Simply initializes the value of an **SPoint** to that of another **SPoint**.

**Parameters:**

- *point*

  *an existing* **SPoint** *object.*

### SDLmm::SPoint::SPoint (Sint16 nx, Sint16 ny)` [inline]`

*Constructor which initializes the class from integer values.*

**Parameters:**

- *nx, horizontal*

  *position*

- *ny, vertical*

  *position*

## MEMBER FUNCTION DOCUMENTATION

### SPoint SDLmm::SPoint::operator \* (Sint16 scalar) const` [inline]`

### SPoint & SDLmm::SPoint::operator \*= (Sint16 scalar)` [inline]`

### SPoint SDLmm::SPoint::operator+ (const SPoint & point) const` [inline]`

### SPoint & SDLmm::SPoint::operator+= (const SPoint & point)` [inline]`

### SPoint SDLmm::SPoint::operator- (const SPoint & point) const` [inline]`

### SPoint & SDLmm::SPoint::operator-= (const SPoint & point)` [inline]`

### SPoint SDLmm::SPoint::operator/ (Sint16 scalar) const` [inline]`

### SPoint & SDLmm::SPoint::operator/= (Sint16 scalar)` [inline]`

### bool SDLmm::SPoint::operator\< (const SPoint & point) const` [inline]`

**Returns:**  *true if both point.x and point.y is larger than x and y in this point.*

### bool SDLmm::SPoint::operator\<= (const SPoint & point) const` [inline]`

**Returns:**  *true if both point.x and point.y is larger than or equal to x and y in this point.*

### SPoint & SDLmm::SPoint::operator= (const SPoint & point)` [inline]`

*Set the value of an* **SPoint** *to that of an existing* **SPoint***.*

### bool SDLmm::SPoint::operator== (const SPoint & point) const` [inline]`

*Compare two points for equality.*

**Returns:**  *true if coordinates are identical in both points.*

### bool SDLmm::SPoint::operator\> (const SPoint & point) const` [inline]`

**Returns:**  *true if both point.x and point.y is smaller than x and y in this point.*

### bool SDLmm::SPoint::operator\>= (const SPoint & point) const` [inline]`

**Returns:**  *true if both point.x and point.y is smaller than or equal to x and y in this point.*

## MEMBER DATA DOCUMENTATION

### Sint16 SDLmm::SPoint::x

### Sint16 SDLmm::SPoint::y

## AUTHOR

*Generated automatically by Doxygen for SDLmm from the source code.*
