Cairo-Chart/src/Point.vala

53 lines
695 B
Vala
Raw Normal View History

2018-01-08 23:33:13 +03:00
namespace CairoChart {
2018-01-19 18:12:06 +03:00
/**
* 64-bit point.
*/
2017-08-28 14:47:31 +03:00
public struct Point {
2018-01-19 18:12:06 +03:00
/**
* X-coordinate.
*/
2018-01-16 13:39:17 +03:00
double x;
2018-01-19 18:12:06 +03:00
/**
* Y-coordinate.
*/
2018-01-16 13:39:17 +03:00
double y;
2018-01-19 18:12:06 +03:00
/**
* Constructs a new ``Point``.
* @param x x-coordinate.
* @param y y-coordinate.
*/
2018-01-16 13:39:17 +03:00
public Point (double x = 0.0, double y = 0.0) {
this.x = x; this.y = y;
}
}
2018-01-19 18:12:06 +03:00
/**
2018-01-19 18:13:27 +03:00
* 128-bit point.
2018-01-19 18:12:06 +03:00
*/
2018-01-16 13:39:17 +03:00
public struct Point128 {
2018-01-19 18:12:06 +03:00
/**
2018-01-19 18:13:27 +03:00
* X-coordinate.
2018-01-19 18:12:06 +03:00
*/
2017-08-28 14:47:31 +03:00
Float128 x;
2018-01-19 18:12:06 +03:00
/**
2018-01-19 18:13:27 +03:00
* Y-coordinate.
2018-01-19 18:12:06 +03:00
*/
2017-08-28 14:47:31 +03:00
Float128 y;
2018-01-19 18:12:06 +03:00
/**
2018-01-19 18:13:27 +03:00
* Constructs a new ``Point128``.
* @param x x-coordinate.
* @param y y-coordinate.
2018-01-19 18:12:06 +03:00
*/
2018-01-16 13:39:17 +03:00
public Point128 (Float128 x = 0.0, Float128 y = 0.0) {
2017-08-28 14:47:31 +03:00
this.x = x; this.y = y;
}
}
}