Skip to content

Instantly share code, notes, and snippets.

View M-erb's full-sized avatar
🧑‍🚀
🚀

merb M-erb

🧑‍🚀
🚀
View GitHub Profile
@M-erb
M-erb / function
Created August 10, 2019 21:39 — forked from manix/calculate geometric euclidean distance
Distance between points simplified
getDistanceFromLatLonInM(lat1, lon1, lat2, lon2) {
var a =
Math.pow(Math.sin(deg2rad(lat2 - lat1) / 2), 2) +
Math.cos(deg2rad(lat1)) * Math.cos(deg2rad(lat2)) *
Math.pow(Math.sin(deg2rad(lon2 - lon1) / 2), 2);
return 12742000 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));
}
@M-erb
M-erb / animated-check.js
Created November 6, 2016 05:41 — forked from tkh44/animated-check.js
Animated Checkmark Directive inspired by http://codepen.io/haniotis/pen/KwvYLO
angular.module('animated-checkmark', []).directive('animatedCheck', animatedCheck);
function animatedCheck() {
const svgTemplate = `
<div class="checkmark-container">
<svg class="checkmark" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 52 52">
<g>
<circle class="checkmark-outline" cx="26" cy="26" r="25" fill="none" />
<circle class="checkmark-circle" cx="26" cy="26" r="25" fill="none" />
<path class="checkmark-check" fill="none" d="M14.1 27.2l7.1 7.2 16.7-16.8" />
</g>