Skip to content

Commit 0c66102

Browse files
committed
added setX/setY method for Point class
1 parent 69a7db0 commit 0c66102

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

inc/webdriver_basic_types.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ class Point {
4040
~Point();
4141

4242
void Offset(double x, double y);
43+
void setX(double x);
44+
void setY(double y);
4345

4446
double x() const;
4547
double y() const;

src/webdriver/webdriver_basic_types.cc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,14 @@ void Point::Offset(double x, double y) {
2323
y_ += y;
2424
}
2525

26+
void Point::setX(double x) {
27+
x_ = x;
28+
}
29+
30+
void Point::setY(double y) {
31+
y_ = y;
32+
}
33+
2634
double Point::x() const {
2735
return x_;
2836
}

0 commit comments

Comments
 (0)