Simba icon indicating copy to clipboard operation
Simba copied to clipboard

TPA.Variance

Open Torwent opened this issue 3 months ago • 4 comments

I actually stumbled on this by accident as I don't really need this but TPA doesn't seem to have a variance method and causes this to not compile:

var
  tpa: TPointArray;
begin
  tpa.Variance();
end. 

Torwent avatar Oct 02 '25 07:10 Torwent

What about:

TPA.ToAxes(X,Y);
vx := X.variance();
vy := Y.Variance();

Would give you the var in each axis.

slackydev avatar Oct 04 '25 15:10 slackydev

What about:

TPA.ToAxes(X,Y);
vx := X.variance();
vy := Y.Variance();

Would give you the var in each axis.

That compiles fine

Torwent avatar Oct 05 '25 15:10 Torwent

My bad, I misunderstood the issue, Simba implies TPA supports var? Iirc those methods are dedicated to numeric arrays.

slackydev avatar Oct 06 '25 03:10 slackydev

Yeah, I didn't even understand what TPA.Variance was supposed to be, but in that case it shouldn't have it available right? makes it confusing.

Torwent avatar Oct 06 '25 08:10 Torwent