MCPcopy Create free account
hub / github.com/AllentDan/LibtorchTutorials / RandomNum

Function RandomNum

lesson7-Detection/src/utils/Augmentations.cpp:4–14  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2
3template<typename T>
4T RandomNum(T _min, T _max)
5{
6 T temp;
7 if (_min > _max)
8 {
9 temp = _max;
10 _max = _min;
11 _min = temp;
12 }
13 return rand() / (double)RAND_MAX *(_max - _min) + _min;
14}
15
16int BBox::GetH()
17{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected