sample method Null safety

T sample(
  1. {Random? random}
)

Generates a random sample.

Example

import 'package:calc/calc.dart';

void main() {
  final distribution = NormalDistribution(mean=0.0, variance:1.0);
  final sample = distribution.sample();
}

Implementation

T sample({Random? random});