MCPcopy Index your code
hub / github.com/secdev/scapy / randval

Method randval

scapy/fields.py:3684–3693  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

3682 )
3683
3684 def randval(self):
3685 # type: () -> RandFloat
3686 value = Field.randval(self) # type: ignore
3687 if value is not None:
3688 min_val = round(value.min * self.scaling + self.offset,
3689 self.ndigits)
3690 max_val = round(value.max * self.scaling + self.offset,
3691 self.ndigits)
3692
3693 return RandFloat(min(min_val, max_val), max(min_val, max_val))
3694
3695
3696class ScalingField(_ScalingField,

Callers

nothing calls this directly

Calls 2

RandFloatClass · 0.90
randvalMethod · 0.45

Tested by

no test coverage detected