mirror of https://github.com/adamdruppe/arsd.git
Fixing the .center() property
Now it is working properly, I have implemented it the right way now.
This commit is contained in:
parent
a318432994
commit
2ac9594f64
5
color.d
5
color.d
|
@ -1509,6 +1509,11 @@ struct Rectangle {
|
||||||
return Point(right, bottom);
|
return Point(right, bottom);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///
|
||||||
|
@property Point center() {
|
||||||
|
return Point((right + left) / 2, (bottom + top) / 2);
|
||||||
|
}
|
||||||
|
|
||||||
///
|
///
|
||||||
@property Size size() {
|
@property Size size() {
|
||||||
return Size(width, height);
|
return Size(width, height);
|
||||||
|
|
Loading…
Reference in New Issue