Jump to content

Math.Mul and Math.Cross


photo

Recommended Posts

Posted

Im trying to port some cpp code to cs and im trying to use MathLib.Mul and MathLib.Cross but it gives me the error and says i need 3 arguments when i give it 3 arguments.

Posted

Wimo135

In C++ there is a specific mul / cross methods that store result to a third variable.

In C# you can pass only two parameters to the method, something like this:

mat4 result = MathLib.Mul(mat4 first_matrix, mat4 second_matrix);

Thanks!

How to submit a good bug report
---
FTP server for test scenes and user uploads:

Posted

Hi, thanks for your response but im porting c++ code to c# and i need to pass 3 params.

Posted

You can implement your own methods that would do the same things (and accept 3 parameters as input), but you would anyway need to call Mul / Cross with only 2 parameters internally, since there is no direct analogue in C#.

How to submit a good bug report
---
FTP server for test scenes and user uploads:

  • 2 weeks later...
Posted

Ive been attempting to implement this without success, Can someone give me an example of this?

×
×
  • Create New...