Skip to content

Commit

Permalink
colormap constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
rms80 committed Nov 17, 2017
1 parent ed23cb5 commit 772123e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion color/ColorMap.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,12 @@ public ColorMap()
validRange = Interval1d.Empty;
}


public ColorMap(float[] t, Colorf[] c)
{
validRange = Interval1d.Empty;
for (int i = 0; i < t.Length; ++i)
AddPoint(t[i], c[i]);
}

public void AddPoint(float t, Colorf c)
{
Expand Down

0 comments on commit 772123e

Please sign in to comment.