MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / with_confidence

Method with_confidence

atomic-core/src/change/credit.rs:298–301  ·  view source on GitHub ↗

Set the confidence level (0.0 to 1.0, stored as 0-100).

(mut self, confidence: f32)

Source from the content-addressed store, hash-verified

296
297 /// Set the confidence level (0.0 to 1.0, stored as 0-100).
298 pub fn with_confidence(mut self, confidence: f32) -> Self {
299 self.confidence = Some((confidence.clamp(0.0, 1.0) * 100.0) as u8);
300 self
301 }
302
303 /// Get the confidence as a float (0.0 to 1.0).
304 pub fn confidence_float(&self) -> Option<f32> {

Callers 1

Calls

no outgoing calls

Tested by 1