You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
543 B
16 lines
543 B
using System;
|
|
using System.Collections.Generic;
|
|
|
|
namespace Geared.Wpf.Histogram
|
|
{
|
|
public static class DataProvider
|
|
{
|
|
public static IEnumerable<double> GetNormalDistribution(double variance, double expectation, int ticks)
|
|
{
|
|
var teoricalVariance = 3 * variance;
|
|
var step = (expectation + teoricalVariance - (expectation - teoricalVariance)) / ticks;
|
|
|
|
for (var x = expectation-teoricalVariance; x <= expectation + teoricalVariance; x += step)
|
|
{
|
|
yield return
|