Ah yes a good ole Matrix. In fact I lied as my TVector type has this method:
But I like the way Big10p is storing the cos and sin before the main calc to reduce the number of calls to cos and sin. Wonder if it's faster creating those two extra local variables. I guess a test is in order.
Method Rotate(angle!) 'clockwise Local tx# = (x * Cos(angle)) - (y * Sin(angle)) Local ty# = (x * Sin(angle)) + (y * Cos(angle)) x=tx y=ty End Method
But I like the way Big10p is storing the cos and sin before the main calc to reduce the number of calls to cos and sin. Wonder if it's faster creating those two extra local variables. I guess a test is in order.