Wing Commander
Reconstructed Win32 source (1996)
Loading...
Searching...
No Matches
mathutil.c File Reference

Integer min and max, a packet-release helper, and the single-precision angular constants. More...

#include "wc1.h"

Go to the source code of this file.

Functions

short MinShort (short a, short b)
short MaxShort (short a, short b,...)
void FreePacketAndClear (void *slot, unsigned short releaseFlags)

Variables

const float fPi = 3.1415927410125732421875f
const float fDegreesPerRadian = 57.295780181884765625f
const float fRadiansPerDegree = 0.01745329238474369049072265625f

Detailed Description

Integer min and max, a packet-release helper, and the single-precision angular constants.

Address range 41d0c0-41d11f. MinShort and MaxShort have 94 call sites across the game core. The constants' read-only data follows the barracks menu regions and precedes the DirectDraw GUIDs, as only a unit linked between those two can place it.

Definition in file mathutil.c.

Function Documentation

◆ FreePacketAndClear()

◆ MaxShort()

◆ MinShort()

Variable Documentation

◆ fDegreesPerRadian

const float fDegreesPerRadian = 57.295780181884765625f

Definition at line 16 of file mathutil.c.

◆ fPi

const float fPi = 3.1415927410125732421875f

Definition at line 15 of file mathutil.c.

◆ fRadiansPerDegree

const float fRadiansPerDegree = 0.01745329238474369049072265625f

Definition at line 17 of file mathutil.c.