Skip to content

Commit

Permalink
Return zero when computing distance of Option with both value is none.
Browse files Browse the repository at this point in the history
  • Loading branch information
mantaroh committed Jun 14, 2017
1 parent 849bdc9 commit 95b272d
Showing 1 changed file with 1 addition and 0 deletions.
Expand Up @@ -853,6 +853,7 @@ impl <T> Animatable for Option<T>
(&Some(ref this), &Some(ref other)) => {
this.compute_squared_distance(other)
},
(&None, &None) => Ok(0.0),
_ => Err(()),
}
}
Expand Down

0 comments on commit 95b272d

Please sign in to comment.