Oolite
Loading...
Searching...
No Matches
OOMaths.h File Reference
#include "OOFunctionAttributes.h"
#include "OOOpenGL.h"
#include <assert.h>
#include <limits.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
#include <tgmath.h>
#include "OOBoundingBox.h"
#include "OOHPVector.h"
#include "OOMatrix.h"
#include "OOTriangle.h"
#include "OOVoxel.h"
#include "legacy_random.h"
Include dependency graph for OOMaths.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define M_PI   3.14159265358979323846 /* pi */
#define M_PI_2   1.57079632679489661923 /* pi/2 */
#define M_PI_4   0.78539816339744830962 /* pi/4 */
#define M_1_PI   0.31830988618379067154 /* 1/pi */
#define M_2_PI   0.63661977236758134308 /* 2/pi */
#define M_2_SQRTPI   1.12837916709551257390 /* 2/sqrt(pi) */
#define M_SQRT2   1.41421356237309504880 /* sqrt(2) */
#define M_SQRT1_2   0.70710678118654752440 /* 1/sqrt(2) */
#define MIN(A, B)
#define MAX(A, B)
#define ABS(A)

Typedefs

typedef GLfloat OOScalar
typedef double OOHPScalar

Macro Definition Documentation

◆ ABS

#define ABS ( A)
Value:
((A) < 0 ? (-(A)) : (A))

Definition at line 97 of file OOMaths.h.

Referenced by Universe::findSystemNumberAtCoords:withGalaxy:includingHidden:.

◆ M_1_PI

#define M_1_PI   0.31830988618379067154 /* 1/pi */

Definition at line 63 of file OOMaths.h.

◆ M_2_PI

#define M_2_PI   0.63661977236758134308 /* 2/pi */

Definition at line 66 of file OOMaths.h.

◆ M_2_SQRTPI

#define M_2_SQRTPI   1.12837916709551257390 /* 2/sqrt(pi) */

Definition at line 69 of file OOMaths.h.

◆ M_PI

◆ M_PI_2

#define M_PI_2   1.57079632679489661923 /* pi/2 */

Definition at line 57 of file OOMaths.h.

◆ M_PI_4

#define M_PI_4   0.78539816339744830962 /* pi/4 */

Definition at line 60 of file OOMaths.h.

◆ M_SQRT1_2

◆ M_SQRT2

#define M_SQRT2   1.41421356237309504880 /* sqrt(2) */

Definition at line 72 of file OOMaths.h.

Referenced by OOLightParticleEntity::initWithDiameter:.

◆ MAX

◆ MIN

#define MIN ( A,
B )
Value:
((A) < (B) ? (A) : (B))

Definition at line 91 of file OOMaths.h.

Referenced by OOTextureLoader(OOPrivate)::applySettings, ShipEntity(Private)::coordinatesForEscortPosition:, DescribeValue(), DescribeValue(), DescribeValue(), PlayerEntity::doBookkeeping:, DockIsQueued(), DockIsQueued(), GuiDisplayGen(Internal)::drawGLDisplay:y:z:alpha:, EquipmentInfoStaticInfoForKey(), EquipmentInfoStaticInfoForKey(), FontMeasureString(), FontMeasureString(), OOTextureLoader(OOPrivate)::getDesiredWidth:andHeight:, GlobalAddFrameCallback(), GlobalAddFrameCallback(), GlobalAutoAIForRole(), GlobalAutoAIForRole(), GlobalDisplayNameForCommodity(), GlobalDisplayNameForCommodity(), GlobalExpandDescription(), GlobalExpandDescription(), GlobalExpandMissionText(), GlobalExpandMissionText(), GlobalKeyBindingDescription(), GlobalKeyBindingDescription(), GlobalRemoveFrameCallback(), GlobalRemoveFrameCallback(), GlobalSetExtraGuiScreenKeys(), OOTextureLoader::initWithPath:options:, OOBreakPatternEntity::initWithPolygonSides:startAngle:aspectRatio:, ManifestComment(), ManifestComment(), ManifestSetComment(), ManifestSetComment(), ManifestSetShortComment(), ManifestSetShortComment(), ManifestShortComment(), ManifestShortComment(), MissionMarkSystem(), MissionMarkSystem(), MissionRunScreen(), MissionRunScreen(), MissionUnmarkSystem(), MissionUnmarkSystem(), PlayerEntity::penaltyForUnauthorizedDocking, PlayerAddMessageToArrivalReport(), PlayerAddMessageToArrivalReport(), PlayerReplaceShip(), PlayerReplaceShip(), PlayerSetPlayerRole(), PlayerSetPlayerRole(), PlayerShipAwardEquipmentToCurrentPylon(), PlayerShipAwardEquipmentToCurrentPylon(), PlayerShipCancelDockingRequest(), PlayerShipCancelDockingRequest(), PlayerShipEngageAutopilotToStation(), PlayerShipEngageAutopilotToStation(), PlayerShipHideHUDSelector(), PlayerShipHideHUDSelector(), PlayerShipRemoveParcel(), PlayerShipRemoveParcel(), PlayerShipRemovePassenger(), PlayerShipRemovePassenger(), PlayerShipRequestDockingClearance(), PlayerShipRequestDockingClearance(), PlayerShipSetCustomHUDDial(), PlayerShipSetCustomHUDDial(), PlayerShipSetMultiFunctionDisplay(), PlayerShipSetMultiFunctionDisplay(), PlayerShipSetMultiFunctionText(), PlayerShipSetMultiFunctionText(), PlayerShipSetPrimedEquipment(), PlayerShipSetPrimedEquipment(), PlayerShipShowHUDSelector(), PlayerShipShowHUDSelector(), PlayerShipUseSpecialCargo(), PlayerShipUseSpecialCargo(), OOALSoundVorbisCodec::readCreatingBuffer:withFrameCount:, ScaleToMatch(), ShipEntity::setPendingEscortCount:, OOBasicMaterial::setShininess:, ShipEntity::setUpShipFromDictionary:, ShipAddCargoEntity(), ShipAddCargoEntity(), ShipAwardEquipment(), ShipAwardEquipment(), ShipCanAwardEquipment(), ShipCanAwardEquipment(), ShipCommsMessage(), ShipCommsMessage(), ShipDumpCargo(), ShipDumpCargo(), ShipEjectItem(), ShipEjectItem(), ShipEjectSpecificItem(), ShipEjectSpecificItem(), ShipEquipmentStatus(), ShipEquipmentStatus(), ShipExitSystem(), ShipExitSystem(), ShipGroupAddShip(), ShipGroupAddShip(), ShipGroupContainsShip(), ShipGroupContainsShip(), ShipGroupRemoveShip(), ShipGroupRemoveShip(), ShipHasEquipmentProviding(), ShipHasEquipmentProviding(), ShipHasRole(), ShipHasRole(), ShipReactToAIMessage(), ShipReactToAIMessage(), ShipRemoveEquipment(), ShipRemoveEquipment(), ShipSendAIMessage(), ShipSendAIMessage(), ShipSetAI(), ShipSetAI(), ShipSetCrew(), ShipSetCrew(), ShipSetScript(), ShipSetScript(), Universe::shipsForSaleForSystem:withTL:atTime:, ShipSpawn(), ShipSpawn(), ShipStaticKeysForRole(), ShipStaticKeysForRole(), ShipStaticRoleIsInCategory(), ShipStaticRoleIsInCategory(), ShipStaticSetShipDataForKey(), ShipStaticSetShipDataForKey(), ShipStaticShipDataForKey(), ShipStaticShipDataForKey(), ShipSwitchAI(), ShipSwitchAI(), SoundStaticLoad(), SoundStaticLoad(), SoundStaticPlayMusic(), SoundStaticPlayMusic(), StationAbortDockingForShip(), StationAbortDockingForShip(), StationAddShipToShipyard(), StationAddShipToShipyard(), StationCanDockShip(), StationCanDockShip(), StationLaunchShipWithRole(), StationLaunchShipWithRole(), StationRemoveShipFromShipyard(), StationRemoveShipFromShipyard(), StationSetInterface(), StationSetInterface(), StationSetMarketPrice(), StationSetMarketPrice(), StationSetMarketQuantity(), StationSetMarketQuantity(), SystemAddMoon(), SystemAddMoon(), SystemAddPlanet(), SystemAddPlanet(), SystemAddShipsOrGroup(), SystemAddShipsOrGroup(), SystemAddShipsOrGroupToRoute(), SystemAddShipsOrGroupToRoute(), SystemAddVisualEffect(), SystemAddVisualEffect(), SystemCountEntitiesWithScanClass(), SystemCountEntitiesWithScanClass(), SystemCountShipsWithPrimaryRole(), SystemCountShipsWithPrimaryRole(), SystemCountShipsWithRole(), SystemCountShipsWithRole(), SystemEntitiesWithScanClass(), SystemEntitiesWithScanClass(), SystemInfoDistanceToSystem(), SystemInfoDistanceToSystem(), SystemInfoRouteToSystem(), SystemInfoRouteToSystem(), SystemInfoSamplePrice(), SystemInfoSamplePrice(), SystemInfoSetPropertyMethod(), SystemInfoSetPropertyMethod(), SystemInfoStaticSetInterstellarProperty(), SystemInfoStaticSetInterstellarProperty(), SystemLegacySpawnShip(), SystemLegacySpawnShip(), SystemSetPopulator(), SystemSetPopulator(), SystemSetWaypoint(), SystemSetWaypoint(), SystemShipsWithPrimaryRole(), SystemShipsWithPrimaryRole(), SystemShipsWithRole(), SystemShipsWithRole(), SystemStaticSystemIDForName(), SystemStaticSystemIDForName(), SystemStaticSystemNameForID(), SystemStaticSystemNameForID(), VectorFromCoordinateSystem(), VectorFromCoordinateSystem(), VectorToCoordinateSystem(), and VectorToCoordinateSystem().

Typedef Documentation

◆ OOHPScalar

typedef double OOHPScalar

Definition at line 51 of file OOMaths.h.

◆ OOScalar

typedef GLfloat OOScalar

Definition at line 49 of file OOMaths.h.