50 lines
1.1 KiB
C
50 lines
1.1 KiB
C
|
#ifndef __PUNKT3D_H
|
||
|
#define __PUNKT3D_H
|
||
|
|
||
|
#include <iostream>
|
||
|
#include <cmath>
|
||
|
#include "emath.h"
|
||
|
|
||
|
class Punkt2D {
|
||
|
public:
|
||
|
Punkt2D();
|
||
|
Punkt2D(float, float);
|
||
|
|
||
|
float x, y;
|
||
|
|
||
|
void set(float, float);
|
||
|
void print(std::string="");
|
||
|
|
||
|
// Operatoren
|
||
|
Punkt2D operator+(const Punkt2D&);
|
||
|
Punkt2D operator-(const Punkt2D&);
|
||
|
Punkt2D& operator+=(const Punkt2D&);
|
||
|
Punkt2D& operator-=(const Punkt2D&);
|
||
|
|
||
|
Punkt2D operator+(const float&);
|
||
|
Punkt2D operator-(const float&);
|
||
|
Punkt2D operator*(const float&);
|
||
|
Punkt2D operator/(const float&);
|
||
|
Punkt2D& operator+=(const float&);
|
||
|
Punkt2D& operator-=(const float&);
|
||
|
Punkt2D& operator*=(const float&);
|
||
|
Punkt2D& operator/=(const float&);
|
||
|
|
||
|
float operator*(const Punkt2D&);
|
||
|
|
||
|
Punkt2D operator-();
|
||
|
|
||
|
bool operator==(const Punkt2D&);
|
||
|
bool operator!=(const Punkt2D&);
|
||
|
|
||
|
friend Punkt2D operator+(const float&, const Punkt2D&);
|
||
|
friend Punkt2D operator-(const float&, const Punkt2D&);
|
||
|
friend Punkt2D operator*(const float&, const Punkt2D&);
|
||
|
friend Punkt2D operator/(const float&, const Punkt2D&);
|
||
|
|
||
|
};
|
||
|
|
||
|
// float abs(Punkt3D);
|
||
|
|
||
|
#endif
|