Skip to content

rng: fix 2 deprecated methods#172

Open
martinfrances107 wants to merge 1 commit into
rajgandhi1:mainfrom
martinfrances107:deprecated_rng
Open

rng: fix 2 deprecated methods#172
martinfrances107 wants to merge 1 commit into
rajgandhi1:mainfrom
martinfrances107:deprecated_rng

Conversation

@martinfrances107

Copy link
Copy Markdown

What does this PR do?

There are two deprecated function call the need fixing

A)

  • let mut rng = thread_rng();
  • let mut rng = rng();

B)

  • let x = -5.0 + rng.gen_range(-0.1..0.1);
  • let x = -5.0 + rng.random_range(-0.1..0.1);

A)
- let mut rng = thread_rng();
+ let mut rng = rng();

B)
- let x = -5.0 + rng.gen_range(-0.1..0.1);
+ let x = -5.0 + rng.random_range(-0.1..0.1);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant