77#if defined(__cplusplus)
80 a_point2_val(
this, &x_, &y_);
84 a_point2_set_val(
this, x_, y_);
88 a_point2_pol(
this, &rho, &theta);
92 a_point2_set_pol(
this, rho, theta);
96 a_point2_add(
this, &rhs, &res);
100 a_point2_sub(
this, &rhs, &res);
104 a_point2_mul(
this, rhs, &res);
108 a_point2_div(
this, rhs, &res);
112 a_point2_pos(
this, &res);
116 a_point2_neg(
this, &res);
118 A_INLINE
a_real dist(
a_point2 const &rhs)
const {
return a_point2_dist(
this, &rhs); }
119 A_INLINE
a_real dist1(
a_point2 const &rhs)
const {
return a_point2_dist1(
this, &rhs); }
120 A_INLINE
a_real dist2(
a_point2 const &rhs)
const {
return a_point2_dist2(
this, &rhs); }
121 friend A_INLINE
void operator+=(
a_point2 &lhs,
a_vector2 const &rhs) { a_point2_add(&lhs, &rhs, &lhs); }
125 a_point2_add(&lhs, &rhs, &res);
128 friend A_INLINE
void operator-=(
a_point2 &lhs,
a_vector2 const &rhs) { a_point2_sub(&lhs, &rhs, &lhs); }
132 a_point2_sub(&lhs, &rhs, &res);
138 a_vector2_set(&res, &rhs, &lhs);
141 friend A_INLINE
void operator*=(
a_point2 &lhs,
a_real rhs) { a_point2_mul(&lhs, rhs, &lhs); }
145 a_point2_mul(&rhs, lhs, &res);
151 a_point2_mul(&lhs, rhs, &res);
154 friend A_INLINE
void operator/=(
a_point2 &lhs,
a_real rhs) { a_point2_div(&lhs, rhs, &lhs); }
158 a_point2_div(&lhs, rhs, &res);
164 a_point2_pos(&rhs, &res);
170 a_point2_neg(&rhs, &res);
199 a_real_cart2pol(ctx->x, ctx->y, rho, theta);
203 a_real_pol2cart(rho, theta, &ctx->x, &ctx->y);