2022-01-23 17:29:51 +00:00
|
|
|
template <class P, class T> inline P polar_x(
|
|
|
|
const P center, const P radius, T angle
|
2021-04-01 15:49:32 +00:00
|
|
|
) {
|
|
|
|
return (((static_cast<long>(radius) * Cos8(angle)) >> 8) + center);
|
|
|
|
}
|
|
|
|
|
2022-01-23 17:29:51 +00:00
|
|
|
template <class P, class T> inline P polar_y(
|
|
|
|
const P center, const P radius, T angle
|
2021-04-01 15:49:32 +00:00
|
|
|
) {
|
|
|
|
return (((static_cast<long>(radius) * Sin8(angle)) >> 8) + center);
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline pixel_t polar_x_fast(
|
|
|
|
pixel_t center, pixel_t radius, unsigned char angle
|
|
|
|
) {
|
|
|
|
return (((static_cast<long>(radius) * CosTable8[angle]) >> 8) + center);
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline pixel_t polar_y_fast(
|
|
|
|
pixel_t center, pixel_t radius, unsigned char angle
|
|
|
|
) {
|
|
|
|
return (((static_cast<long>(radius) * SinTable8[angle]) >> 8) + center);
|
|
|
|
}
|