-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPlotter.cs
37 lines (36 loc) · 1.49 KB
/
Plotter.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Text;
using System.Threading.Tasks;
using System.Linq;
using UnityEngine;
public class Plotter
{
// public string Plot(string type, float value, float min, float max, int length)
// {
// string output = "";
// string style = "░▒▓█" + "─┼├┤" + "╔╚";
// float marker;
// int i = 0;
// switch (type)
// {
// case "ProgressBar":
// marker = Mathf.Clamp(value.Remap(min, max, 0, length), 0, length);
// if (float.IsNaN(marker)) return "";
// // if (marker == length) return style[3].ToString().Repeat(length);
// return (marker % 1 > 0) ?
// style[3].ToString().Repeat(Mathf.FloorToInt(marker)) + style[(int) (4 * (marker % 1))] + ' '.ToString().Repeat(Mathf.FloorToInt(length - marker)) :
// style[3].ToString().Repeat(Mathf.FloorToInt(marker)) + ' '.ToString().Repeat(Mathf.FloorToInt(length - marker));
// case "Marker":
// marker = Mathf.Clamp(value.Remap(min, max, 0, length), 0, length - .01f);
// if (float.IsNaN(marker)) return "";
// return new StringBuilder(style[4].ToString().Repeat(length))
// {
// [(int)marker] = style[5]
// }.ToString();
// }
// return "";
// }
}