mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-20 23:40:10 +00:00
优化数据存储类型由float全部转为double
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
/* */
|
||||
/************************************************/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
@@ -23,16 +24,14 @@ namespace XCharts.Examples
|
||||
chart.series.SetSerieSymbolSizeCallback(SymbolSize, SymbolSelectedSize);
|
||||
}
|
||||
|
||||
float SymbolSize(List<float> data)
|
||||
float SymbolSize(List<double> data)
|
||||
{
|
||||
//return Mathf.Clamp(data[1] * 10,1,100);
|
||||
return (float)(Mathf.Sqrt(data[2]) / 6e2);
|
||||
return (float)(Math.Sqrt(data[2]) / 6e2);
|
||||
}
|
||||
|
||||
float SymbolSelectedSize(List<float> data)
|
||||
float SymbolSelectedSize(List<double> data)
|
||||
{
|
||||
//return Mathf.Clamp(data[1] * 10,1,100);
|
||||
return (float)(Mathf.Sqrt(data[2]) / 5e2);
|
||||
return (float)(Math.Sqrt(data[2]) / 5e2);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user