import mir.test: shouldApprox; 0.0.rayleighPDF.shouldApprox == 0.0; 0.5.rayleighPDF.shouldApprox == 0.4412485; 1.0.rayleighPDF.shouldApprox == 0.6065307; 2.0.rayleighPDF.shouldApprox == 0.2706706; // Can also provide scale parameter 0.5.rayleighPDF(2.0).shouldApprox == 0.1211541; 1.0.rayleighPDF(2.0).shouldApprox == 0.2206242; 4.0.rayleighPDF(2.0).shouldApprox == 0.1353353;
Ditto, with scale parameter.