![]() |
C# scripting, range() - Printable Version +- tyFlow Forum (https://forum.tyflow.com) +-- Forum: tyFlow Discussion (https://forum.tyflow.com/forum-1.html) +--- Forum: Feature Requests (https://forum.tyflow.com/forum-4.html) +--- Thread: C# scripting, range() (/thread-4848.html) |
C# scripting, range() - jcjworks - 06-25-2025 In C# scripting, how can I use the range function to generate a sequence of integers? What is the syntax for range? Sometimes I need a large set of numbers, like range(5, 19). PHP Code: public void simulationStep() RE: C# scripting, range() - jcjworks - 06-25-2025 Is using a loop structure like“ for (int rangeA = 6; rangeA <= 12; rangeA++){} ”the only approach available? RE: C# scripting, range() - jcjworks - 06-26-2025 I'm using this list-to-matrix conversion method, but I'm not sure if it's the most performance-optimized approach in tyflow with C#? PHP Code: List<int> Ranges(string input) { RE: C# scripting, range() - tyFlow - 06-27-2025 All C# syntax is valid - and the Math.Random library has range functions, or you can use tyFlow's exposed random range functions. Just initialize a generlic list of ints and fill with random values. RE: C# scripting, range() - jcjworks - 06-30-2025 (06-27-2025, 03:55 PM)tyFlow Wrote: All C# syntax is valid - and the Math.Random library has range functions, or you can use tyFlow's exposed random range functions. Just initialize a generlic list of ints and fill with random values. ![]() ![]() Additionally, it would be great if the vector attributes for custom properties operators could provide quick access to common geometry properties like normals and tangents. Even better would be the addition of mathematical operators for vectors. |