188 |
return successResult(i >> n); |
return successResult(i >> n); |
189 |
} |
} |
190 |
|
|
191 |
|
/////////////////////////////////////////////////////////////////////////// |
192 |
|
// built-in script function: min() |
193 |
|
|
194 |
|
VMFnResult* CoreVMFunction_min::exec(VMFnArgs* args) { |
195 |
|
int l = args->arg(0)->asInt()->evalInt(); |
196 |
|
int r = args->arg(1)->asInt()->evalInt(); |
197 |
|
return successResult(l < r ? l : r); |
198 |
|
} |
199 |
|
|
200 |
|
/////////////////////////////////////////////////////////////////////////// |
201 |
|
// built-in script function: max() |
202 |
|
|
203 |
|
VMFnResult* CoreVMFunction_max::exec(VMFnArgs* args) { |
204 |
|
int l = args->arg(0)->asInt()->evalInt(); |
205 |
|
int r = args->arg(1)->asInt()->evalInt(); |
206 |
|
return successResult(l > r ? l : r); |
207 |
|
} |
208 |
|
|
209 |
} // namespace LinuxSampler |
} // namespace LinuxSampler |