Jump to content
Toggle menu
  • 17.3K articles
  • 8.2K files
  • 5 users
  • 280.7K edits
WoW Classic Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

This article is a part of the documentation of the Sea function library

A library in Sea, Sea.math contains various mathematical functions not found in WoW lua.

Constants in Sea.math

  • pi - 3.14...

Functions in Sea.math

  • rgbaFromHex - converts a series of 8 hex characters into RGBA
  • intFromHex - converts a hex string into an integer.
  • hexFromInt - converts an integer into a hex string
  • convertBase - a generic base conversion routine
  • round - rounds a float value to the closest integer, e.g. 0.4 to 0, 0.5 to 1, 123.8 to 124

Note: instead of using Sea.math.intFromHex(arg) use tonumber(arg,16) as latter should be faster. --Drundia 21:47, 25 April 2006 (EDT)