umap-rs 0.4.5

Fast, parallel, memory-efficient Rust implementation of UMAP
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/*
  Standard clamping of a value into a fixed range (in this case -4.0 to 4.0)

  Parameters
  ----------
  val: float
      The value to be clamped.

  Returns
  -------
  The clamped value, now fixed to be in the range -4.0 to 4.0.
*/
pub fn clip(val: f32) -> f32 {
  val.clamp(-4.0, 4.0)
}