Skip to content

Commit 772123e

Browse files
committed
colormap constructor
1 parent ed23cb5 commit 772123e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

color/ColorMap.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,12 @@ public ColorMap()
1919
validRange = Interval1d.Empty;
2020
}
2121

22-
22+
public ColorMap(float[] t, Colorf[] c)
23+
{
24+
validRange = Interval1d.Empty;
25+
for (int i = 0; i < t.Length; ++i)
26+
AddPoint(t[i], c[i]);
27+
}
2328

2429
public void AddPoint(float t, Colorf c)
2530
{

0 commit comments

Comments
 (0)