Minor doc updates

Reveal more Rua documentation that I had already written years ago, and
clean up Array a little.
This commit is contained in:
Jeff Teunissen 2010-12-16 06:20:58 -05:00
parent a8e3d5d527
commit 4968b65b2f
3 changed files with 72 additions and 51 deletions

View file

@ -4,7 +4,7 @@
#include "Object.h" #include "Object.h"
/** /**
A general ordered collection class The %Array class is a general ordered collection class.
The %Array class manages an ordered collection of objects. The %Array class manages an ordered collection of objects.
If you want to subclass Array, you need to override these methods: If you want to subclass Array, you need to override these methods:
@ -133,11 +133,12 @@
#if 0 #if 0
/** /**
Copies all object references in the receiver to \a aBuffer. Copies all object references in the range \a aRange to \a aBuffer.
\warning The destination buffer must be large enough to hold all contents. \warning The destination buffer must be large enough to hold all contents.
*/ */
- (BOOL) getObjects: (id [])aBuffer; - (BOOL) getObjects: (id [])aBuffer
range: (Range)aRange;
#endif #endif
//\} //\}

View file

@ -31,53 +31,38 @@
#ifndef __ruamoko_math_h #ifndef __ruamoko_math_h
#define __ruamoko_math_h #define __ruamoko_math_h
/* /**
random Generate a random number such that 0 <= n <= 1 (0 to 1 inclusive)
Generate a random number such that 0 <= num <= 1 (0 to 1 inclusive)
*/ */
@extern float random (void); @extern float random (void);
/* /**
ftoi Returns the integer component of \a f
Returns the integer component of f
*/ */
@extern integer ftoi (float f); @extern integer ftoi (float f);
/* /**
itof Returns the float representation of \a i
Returns the float representation of i
*/ */
@extern float itof (integer i); @extern float itof (integer i);
/* /**
rint Rounds \a f to the nearest integer value and returns it. Does not change the type.
Rounds v to the nearest integer value and returns it.
rint() does not change the type.
*/ */
@extern float rint (float v); @extern float rint (float f);
/* /**
floor Returns \a f, rounded down to the next lower integer
Returns v, rounded down to the next lower integer
*/ */
@extern float floor (float v); @extern float floor (float f);
/* /**
ceil Returns \a f, rounded up to the next highest integer
Returns v, rounded up to the next highest integer
*/ */
@extern float ceil (float v); @extern float ceil (float f);
/* /**
fabs Returns the absolute value of \a f
Returns the absolute value of v
*/ */
@extern float fabs (float f); @extern float fabs (float f);
@ -87,45 +72,73 @@
@extern vector v_forward, v_up, v_right; @extern vector v_forward, v_up, v_right;
/* /**
normalize Transform vector \a v into a unit vector (a vector with a length of 1).
Transform vector v into a unit vector (a vector with a length of 1).
The direction is not changed, except for (possible) roundoff errors. The direction is not changed, except for (possible) roundoff errors.
*/ */
@extern vector normalize (vector v); @extern vector normalize (vector v);
/* /**
vlen Return the length of vector \a v
Return the length of vector v
*/ */
@extern float vlen (vector v); @extern float vlen (vector v);
/* /**
vectoyaw Returns the yaw angle ("bearing"), in degrees, associated with vector \a v.
Returns the yaw angle ("bearing"), in degrees, associated with vector v.
*/ */
@extern float vectoyaw (vector v); @extern float vectoyaw (vector v);
/* /**
vectoangles Returns a vector 'pitch yaw 0' corresponding to vector \a v.
Returns a vector 'pitch yaw 0' corresponding to vector v.
*/ */
@extern vector vectoangles (vector v); @extern vector vectoangles (vector v);
/**
Returns the sine of \a x.
*/
@extern float sin (float x); @extern float sin (float x);
/**
Returns the cosine of \a x.
*/
@extern float cos (float x); @extern float cos (float x);
/**
Returns the tangent of \a x.
*/
@extern float tan (float x); @extern float tan (float x);
/**
Returns the arcsine of \a x.
*/
@extern float asin (float x); @extern float asin (float x);
/**
Returns the arccosine of \a x.
*/
@extern float acos (float x); @extern float acos (float x);
/**
Returns the arctangent of \a x.
*/
@extern float atan (float x); @extern float atan (float x);
@extern float atan2 (float y, float x); @extern float atan2 (float y, float x);
/**
Returns the natural log of \a x.
*/
@extern float log (float x); @extern float log (float x);
/**
Returns the base-10 log of \a x.
*/
@extern float log10 (float x); @extern float log10 (float x);
/**
Returns \a x to the \a y power
*/
@extern float pow (float x, float y); @extern float pow (float x, float y);
@extern float sinh (float x); @extern float sinh (float x);
@extern float cosh (float x); @extern float cosh (float x);
@extern float tanh (float x); @extern float tanh (float x);

View file

@ -9,6 +9,7 @@
@interface Array (Private) @interface Array (Private)
///\name Private methods ///\name Private methods
///Don't use these unless you know what you're doing.
//\{ //\{
/** /**
Adds an object to the receiver, but without retaining it. Adds an object to the receiver, but without retaining it.
@ -32,4 +33,10 @@
@end @end
/*
By including this header, we tell the compiler that we make use of Array's
private methods.
*/
@reference Array (Private);
#endif //__ruamoko_Array_Private_h #endif //__ruamoko_Array_Private_h