mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 15:22:04 +00:00
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:
parent
a8e3d5d527
commit
4968b65b2f
3 changed files with 72 additions and 51 deletions
|
@ -4,7 +4,7 @@
|
|||
#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.
|
||||
If you want to subclass Array, you need to override these methods:
|
||||
|
@ -133,11 +133,12 @@
|
|||
|
||||
#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.
|
||||
*/
|
||||
- (BOOL) getObjects: (id [])aBuffer;
|
||||
- (BOOL) getObjects: (id [])aBuffer
|
||||
range: (Range)aRange;
|
||||
#endif
|
||||
//\}
|
||||
|
||||
|
|
|
@ -31,53 +31,38 @@
|
|||
#ifndef __ruamoko_math_h
|
||||
#define __ruamoko_math_h
|
||||
|
||||
/*
|
||||
random
|
||||
|
||||
Generate a random number such that 0 <= num <= 1 (0 to 1 inclusive)
|
||||
/**
|
||||
Generate a random number such that 0 <= n <= 1 (0 to 1 inclusive)
|
||||
*/
|
||||
@extern float random (void);
|
||||
|
||||
/*
|
||||
ftoi
|
||||
|
||||
Returns the integer component of f
|
||||
/**
|
||||
Returns the integer component of \a f
|
||||
*/
|
||||
@extern integer ftoi (float f);
|
||||
|
||||
/*
|
||||
itof
|
||||
|
||||
Returns the float representation of i
|
||||
/**
|
||||
Returns the float representation of \a i
|
||||
*/
|
||||
@extern float itof (integer i);
|
||||
|
||||
/*
|
||||
rint
|
||||
|
||||
Rounds v to the nearest integer value and returns it.
|
||||
rint() does not change the type.
|
||||
/**
|
||||
Rounds \a f to the nearest integer value and returns it. Does not change the type.
|
||||
*/
|
||||
@extern float rint (float v);
|
||||
@extern float rint (float f);
|
||||
|
||||
/*
|
||||
floor
|
||||
|
||||
Returns v, rounded down to the next lower integer
|
||||
/**
|
||||
Returns \a f, rounded down to the next lower integer
|
||||
*/
|
||||
@extern float floor (float v);
|
||||
@extern float floor (float f);
|
||||
|
||||
/*
|
||||
ceil
|
||||
|
||||
Returns v, rounded up to the next highest integer
|
||||
/**
|
||||
Returns \a f, rounded up to the next highest integer
|
||||
*/
|
||||
@extern float ceil (float v);
|
||||
@extern float ceil (float f);
|
||||
|
||||
/*
|
||||
fabs
|
||||
|
||||
Returns the absolute value of v
|
||||
/**
|
||||
Returns the absolute value of \a f
|
||||
*/
|
||||
@extern float fabs (float f);
|
||||
|
||||
|
@ -87,45 +72,73 @@
|
|||
|
||||
@extern vector v_forward, v_up, v_right;
|
||||
|
||||
/*
|
||||
normalize
|
||||
|
||||
Transform vector v into a unit vector (a vector with a length of 1).
|
||||
/**
|
||||
Transform vector \a v into a unit vector (a vector with a length of 1).
|
||||
The direction is not changed, except for (possible) roundoff errors.
|
||||
*/
|
||||
@extern vector normalize (vector v);
|
||||
|
||||
/*
|
||||
vlen
|
||||
|
||||
Return the length of vector v
|
||||
/**
|
||||
Return the length of vector \a v
|
||||
*/
|
||||
@extern float vlen (vector v);
|
||||
|
||||
/*
|
||||
vectoyaw
|
||||
|
||||
Returns the yaw angle ("bearing"), in degrees, associated with vector v.
|
||||
/**
|
||||
Returns the yaw angle ("bearing"), in degrees, associated with vector \a v.
|
||||
*/
|
||||
@extern float vectoyaw (vector v);
|
||||
|
||||
/*
|
||||
vectoangles
|
||||
|
||||
Returns a vector 'pitch yaw 0' corresponding to vector v.
|
||||
/**
|
||||
Returns a vector 'pitch yaw 0' corresponding to vector \a v.
|
||||
*/
|
||||
@extern vector vectoangles (vector v);
|
||||
|
||||
/**
|
||||
Returns the sine of \a x.
|
||||
*/
|
||||
@extern float sin (float x);
|
||||
|
||||
/**
|
||||
Returns the cosine of \a x.
|
||||
*/
|
||||
@extern float cos (float x);
|
||||
|
||||
/**
|
||||
Returns the tangent of \a x.
|
||||
*/
|
||||
@extern float tan (float x);
|
||||
|
||||
/**
|
||||
Returns the arcsine of \a x.
|
||||
*/
|
||||
@extern float asin (float x);
|
||||
|
||||
/**
|
||||
Returns the arccosine of \a x.
|
||||
*/
|
||||
@extern float acos (float x);
|
||||
|
||||
/**
|
||||
Returns the arctangent of \a x.
|
||||
*/
|
||||
@extern float atan (float x);
|
||||
@extern float atan2 (float y, float x);
|
||||
|
||||
/**
|
||||
Returns the natural log of \a x.
|
||||
*/
|
||||
@extern float log (float x);
|
||||
|
||||
/**
|
||||
Returns the base-10 log of \a x.
|
||||
*/
|
||||
@extern float log10 (float x);
|
||||
|
||||
/**
|
||||
Returns \a x to the \a y power
|
||||
*/
|
||||
@extern float pow (float x, float y);
|
||||
|
||||
@extern float sinh (float x);
|
||||
@extern float cosh (float x);
|
||||
@extern float tanh (float x);
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
@interface Array (Private)
|
||||
|
||||
///\name Private methods
|
||||
///Don't use these unless you know what you're doing.
|
||||
//\{
|
||||
/**
|
||||
Adds an object to the receiver, but without retaining it.
|
||||
|
@ -32,4 +33,10 @@
|
|||
|
||||
@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
|
||||
|
|
Loading…
Reference in a new issue