MCPcopy Create free account
hub / github.com/davisking/dlib / sign

Function sign

dlib/matrix/matrix_math_functions.h:83–89  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

81
82 template <typename type>
83 inline type sign (const type& val)
84 {
85 if (val >= 0)
86 return +1;
87 else
88 return -1;
89 }
90
91 template <typename type>
92 type cubed (const type& val)

Callers 1

matrix_testFunction · 0.85

Calls

no outgoing calls

Tested by 1

matrix_testFunction · 0.68