Skip to content

Instantly share code, notes, and snippets.

@bryik
bryik / .block
Last active December 4, 2019 19:21
Anisotropic Filtering With and Without
license: mit
@luthfianto
luthfianto / dda.js
Created September 29, 2014 12:48
Digital Differential Analyzer in JavaScript
function dda(x0, y0, x1, y1)
{
const dx = x1 - x0,
dy = y1 - y0,
s = Math.abs(dx) > Math.abs(dy) ? Math.abs(dx) : Math.abs(dy),
xi = dx * 1.0 / s,
yi = dy * 1.0 / s
var x = x0,
y = y0,