MCPcopy Create free account
hub / github.com/Norbyte/ositools / Factorial

Function Factorial

OsiInterface/Functions/MathFunctions.cpp:99–109  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

97 }
98
99 bool Factorial(OsiArgumentDesc & args)
100 {
101 auto n = args[0].Int32;
102 int32_t fact = 0;
103 for (int32_t i = 1; i <= n; i++) {
104 fact *= i;
105 }
106
107 args[1].Int32 = fact;
108 return true;
109 }
110
111 bool Log(OsiArgumentDesc & args)
112 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected