Razaekel / noise-rs

Procedural noise generation library for Rust.
Apache License 2.0
852 stars 119 forks source link

Unfinished TODO in permutationtable.rs #150

Closed Razaekel closed 7 years ago

Razaekel commented 7 years ago

In commit #92 (41c0df5) @amaranth added a TODO to permutationtable.rs (was seed.rs). It looks like this TODO was partially completed by @arturoc in commit #94 but never actually finished.

The intent of the code is to extract the lowest byte from the input value and use that as the index into the table. This can be done with just the NumCast trait, so I don't see the purpose of the Signed and PrimInt traits.

@amaranth, would you be able to explain your thinking at the time?

amaranth commented 7 years ago

Not really sure, I think I was just trying to replicate what we had already and was trying to get the traits that meant "this is a uint but I don't care what size".

amaranth commented 7 years ago

TODO cleaned up as a part of removing all usage of num_traits.