Get an Epic Experience with Premium

Basic Mathematic Functions

Galaxy Scripts Login to Add Favorites
  • 0 Likes
  • StarCraft II
  • 4 Monthly Downloads
  • Supports:
  • 653 Total Downloads
  • Updated 03/23/2010
  • Created 03/12/2010
  • 0 Favorites
  • Project Site
  • Release Type: Release
  • License: Public Domain
  • Newest File: math.galaxy
or

About Basic Mathematic Functions

// Basic
int round(fixed f);
int floor(fixed f);
int ceil(fixed f);
bool isInt(fixed f);
fixed mod(fixed f, fixed k);

// Trigonometric
const fixed PI = 3.14159265;
const fixed PI_OVER_TWO = 1.570796326795;
const fixed ONE_OVER_PI = 0.318309886183;
const fixed SQRT_TWO = 1.414213562373;
const fixed MATH_E = 2.718281828459;

fixed cos (fixed x);
fixed sin (fixed x);
fixed tan (fixed x);
fixed sec (fixed x);
fixed csc (fixed x);
fixed cot (fixed x);

fixed DegToRad (fixed x);
fixed RadToDeg (fixed x);

// Point
fixed PointX(point p);
fixed PointY(point p);

Adding

const fixed PI_OVER_TWO = 1.570796326795; const fixed ONE_OVER_PI = 0.318309886183; const fixed SQRT_TWO = 1.414213562373; const fixed MATH_E = 2.718281828459; fixed sec (fixed x); fixed csc (fixed x); fixed cot (fixed x);
Login to Curse

Don't have an account? Create One.

Get an epic experience with Curse Premium
  • Faster addon downloads
  • Premium-Only Beta Giveaways
  • Ad-Free Curse experience
  • Premium Curse Client
  • and many More Features
  • Learn More »

Infinite Crisis NA

Get Your Preferred Access Code!