PDA

View Full Version : Exponents...


BACON.
30th Dec 2001, 10:52 AM
Does UnrealScript have any built-in support for calculating exponents? I know I can write my own function to do it, but I'd rather use built-in functions and operators if there are any. I looked through the Object class and didn't see anything.

Papapishu
30th Dec 2001, 10:59 AM
what's that?

Mychaeel
30th Dec 2001, 11:28 AM
From the Object class:native(170) static final operator(12) float ** ( float A, float B );
native(191) static final function float Exp ( float A );Is that what you're looking for?

BACON.
30th Dec 2001, 04:43 PM
...now I'm all embarrassed. They had to hide it below all that trigonometry stuff so that someone looking at it quickly won't see it. Thanks, though. The mystery comes to an end.

Just to clarify, what does the second one do? Does that return 10^A?

usaar33
30th Dec 2001, 05:22 PM
Originally posted by BACON.
...now I'm all embarrassed. They had to hide it below all that trigonometry stuff so that someone looking at it quickly won't see it. Thanks, though. The mystery comes to an end.

Just to clarify, what does the second one do? Does that return 10^A?

e^A


But do note that UT can only do natural log.

But if you are clever, you can use that to do any base.