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

28 lines
483 B
C
Raw Normal View History

2013-04-04 20:44:15 +00:00
/*
* 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();
public:
2013-04-04 20:44:15 +00:00
float start;
float end;
private:
Interval(float start, float end);
2013-04-04 20:44:15 +00:00
};
#endif /* DG_INTERVAL_H_ */