App
Public Member Functions | Public Attributes | List of all members
app::Point Class Reference

Třída reprezentuje bod v rovině pomocí celočíselných souřadnic x a y. More...

#include <Geometry.hpp>

Public Member Functions

 Point ()
 Vytvoří bod (0, 0).
 
 Point (int x, int y)
 Vytvoří bod (x, y).
 
int isPositive () const
 Vrací 1 pokud bod leží v 1. kvadrantu.
 

Public Attributes

int x
 x-ová souřadnice bodu.
 
int y
 y-ová souřadnice bodu.
 

Detailed Description

Třída reprezentuje bod v rovině pomocí celočíselných souřadnic x a y.

Definition at line 22 of file Geometry.hpp.

Constructor & Destructor Documentation

app::Point::Point ( )
inline

Vytvoří bod (0, 0).

Definition at line 28 of file Geometry.hpp.

{ x = 0; y = 0; }
app::Point::Point ( int  x,
int  y 
)
inline

Vytvoří bod (x, y).

Vytvoří bod (x, y).

Parameters
xx-ová souřadnice bodu.
yy-ová souřadnice bodu.

Definition at line 36 of file Geometry.hpp.

{ this->x = x; this->y = y; }

Member Function Documentation

int app::Point::isPositive ( ) const
inline

Vrací 1 pokud bod leží v 1. kvadrantu.

Vrací 1 pokud bod leží v 1. kvadrantu, tedy x >= 0 && y >= 0.

Returns
1 pokud leží v 1. kvadrantu, jinak 0.

Definition at line 43 of file Geometry.hpp.

{ if (x < 0 || y < 0) { return 0; } else { return 1; } }

Member Data Documentation

int app::Point::x

x-ová souřadnice bodu.

Definition at line 24 of file Geometry.hpp.

int app::Point::y

y-ová souřadnice bodu.

Definition at line 25 of file Geometry.hpp.


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