Skip to content

Instantly share code, notes, and snippets.

View cnanders's full-sized avatar

Chris Anderson cnanders

  • Berkeley, CA
View GitHub Profile
@cnanders
cnanders / PromiseSimple.js
Last active October 24, 2019 18:49 — forked from treyhuffine/PromiseSimple.js
A simple JavaScript Promise implementation for education purposes
class PromiseSimple {
constructor(executionFunction) {
this.promiseChain = [];
this.handleError = () => {};
this.onResolve = this.onResolve.bind(this);
this.onReject = this.onReject.bind(this);
// executing this function either calls this.onResolve
// or this.onReject
classdef Psd
properties (Constant)
% Energy (Power/Freq) units useful for ZEMAX
A_A_um = 1e-10*1e-10*1e-6;
nm_nm_mm = 1e-9*1e-9*1e-3;
end