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-05-26 18:57:20 +02:00

27 lines
490 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(const Interval& other) const;
bool isInside(float point) const;
float getLength();
public:
float start;
float end;
private:
Interval(float start, float end);
};
#endif /* DG_INTERVAL_H_ */