Skip to content

Commit

Permalink
Delete unnecessary comments
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianK13 committed Apr 6, 2024
1 parent 3e2ae22 commit 3b1d4fb
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/colormaps.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
// from https://observablehq.com/@flimsyhat/webgl-color-maps
export function viridis(t: number) {
t = Math.min(Math.max(t, 0), 1);
//viridis
//viridis from https://observablehq.com/@flimsyhat/webgl-color-maps
const c0 = [0.2777273272234177, 0.005407344544966578, 0.3340998053353061];
const c1 = [0.1050930431085774, 1.404613529898575, 1.384590162594685];
const c2 = [-0.3308618287255563, 0.214847559468213, 0.09509516302823659];
const c3 = [-4.634230498983486, -5.799100973351585, -19.33244095627987];
const c4 = [6.228269936347081, 14.17993336680509, 56.69055260068105];
const c5 = [4.776384997670288, -13.74514537774601, -65.35303263337234];
const c6 = [-5.435455855934631, 4.645852612178535, 26.3124352495832];

//const res = c0*0.004+t*(c1+t*(c2+t*(c3+t*(c4+t*(c5+t*c6)))))*0.004;
const res = [
c0[0] + t * (c1[0] + t * (c2[0] + t * (c3[0] + t * (c4[0] + t * (c5[0] + t * c6[0]))))),
c0[1] + t * (c1[1] + t * (c2[1] + t * (c3[1] + t * (c4[1] + t * (c5[1] + t * c6[1]))))),
Expand Down

0 comments on commit 3b1d4fb

Please sign in to comment.