algorithmic modeling for Rhino
So I would like to run the following code within the solver portion of a custom c# component and not in a function.
However I cannot find a way to run this within the solver portion without it freezing like mad when run in GH.
The code needs to be in C# and compiled as /UNSAFE.
Any Ideas are much appreciated.
I know this is splitting hairs, but calling functions appears to be slower..... or am I missing something?
public unsafe float test(floatx)
{
float xhalf = 0.5f * x;
int i = *(int*)&x; // get bits for floating value
i = 0x5f375a86 - (i >> 1);
return x;
}
Tags:
By the way this works fine, but calling a function is slower I am guessing?
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by