modf

  • Thread starter Thread starter Patrick Sullivan
  • Start date Start date
P

Patrick Sullivan

Is there any VB function that can do what modf() does in Visual C/C++, like

Modf: Splits a floating-point value into fractional and integer parts. The
integer portion is stored in *intptr (address of the variable) and the
fraction is returned as the variable x.

double modf(
double x,
double *intptr
);

float modf(
float x,
float *intptr
); // C++ only

long double modf(
long double x,
long double * intptr
); // C++ only

float modff(
float x,
float *intptr
);

VB.Net's Mod requires two numbers, it seems, like and 8 and a 3 for inputs
and returns the modulus remainder. 8 mod 3 = 2

floor and ceiling do not give correct results, but it seems like I should be
able to use something like A = floor(angle) - ceiling(angle).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top