6#include <AH/STL/limits>
8#include <Settings/SettingsWrapper.hpp>
13static constexpr inline int sgn(T val) {
14 return (T(0) < val) - (val < T(0));
21 struct Pixel :
public Printable {
25 size_t printTo(Print &p)
const override;
27 int dx = this->x - other.
x;
28 int dy = this->
y - other.
y;
77 static int cos(
float angle) {
82 static int sin(
float angle) {
static constexpr int sgn(T val)
#define BEGIN_CS_NAMESPACE
Line rasterization algorithm for drawing lines to the display.
BresenhamLine(Pixel start, float angle)
static const int errorScalingFactor
static int sin(float angle)
static int cos(float angle)
BresenhamLine(Pixel start, int cos, int sin)
pint getCurrentLength() const
unsigned int distanceSquared(Pixel other) const
size_t printTo(Print &p) const override