Skip to content

Commit

Permalink
feat(evaluators): added inversed linear evaluator helper (#19)
Browse files Browse the repository at this point in the history
Co-authored-by: doomy <2640792-_doomy@users.noreply.gitlab.com>
  • Loading branch information
2 people authored and zkat committed Apr 27, 2021
1 parent 748b30a commit f871d19
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/evaluators.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ impl LinearEvaluator {
pub fn new() -> Self {
Self::new_full(0.0, 0.0, 1.0, 1.0)
}
pub fn new_inversed() -> Self {
Self::new_ranged(1.0, 0.0)
}
pub fn new_ranged(min: f32, max: f32) -> Self {
Self::new_full(min, 0.0, max, 1.0)
}
Expand Down

0 comments on commit f871d19

Please sign in to comment.