This repository has been archived on 2019-12-07. You can view files and clone it, but cannot push or open issues or pull requests.
dungeon-gunner/source/util/Interval.h
2013-04-04 22:50:40 +02:00

27 lines
484 B
C++

/*
* Interval.h
*
* Created on: 03.04.2013
* Author: Felix
*/
#ifndef DG_INTERVAL_H_
#define DG_INTERVAL_H_
class Interval {
public:
static Interval IntervalFromRadius(float center, float radius);
static Interval IntervalFromPoints(float start, float end);
Interval getOverlap(Interval other) const;
bool isInside(float point) const;
float getLength();
private:
Interval(float start, float end);
private:
float start;
float end;
};
#endif /* DG_INTERVAL_H_ */