mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2025-06-16 15:17:13 +02:00
Allow circles to be transformed to area points.
This commit is contained in:
@ -548,6 +548,26 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
/// Appends values to the end of the Array
|
||||
///
|
||||
/// \param func Functor that is continuously called to push values on the stack
|
||||
///
|
||||
/// \tparam F Type of functor (usually doesnt need to be defined explicitly)
|
||||
///
|
||||
/// \return The Array itself so the call can be chained
|
||||
///
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
template<class F, class... A>
|
||||
ArrayBase& AppendFromCounted(F&& func, A &&... a) {
|
||||
sq_pushobject(vm, GetObj());
|
||||
for (SQInteger i = 0; func(vm, i, std::forward< A >(a)...); ++i)
|
||||
{
|
||||
sq_arrayappend(vm, -2);
|
||||
}
|
||||
sq_pop(vm,1); // pop array
|
||||
return *this;
|
||||
}
|
||||
};
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
Reference in New Issue
Block a user