added helper function to git
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
namespace UwU {
|
||||
|
||||
class Bresenham {
|
||||
private:
|
||||
int16_t x0;
|
||||
int16_t y0;
|
||||
int16_t x1;
|
||||
int16_t y1;
|
||||
int16_t d;
|
||||
int16_t
|
||||
|
||||
public:
|
||||
Bresenham(int16_t x0, int16_t y0, int16_t x1, int16_t y1) {
|
||||
this->x0 = x0;
|
||||
this->y0 = y0;
|
||||
this->x1 = x1;
|
||||
this->y1 = y1;
|
||||
|
||||
if (abs(y1 - y0) < abs(x1 - x0)) {
|
||||
if (x0 > x1) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user