Editing Namespace Guide math

From MINR.ORG WIKI

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 1: Line 1:
[[Namespace Documentation|Return to namespace list]]
 
 
 
= math =
 
= math =
 
'''Status: STABLE (safe to use)'''
 
'''Status: STABLE (safe to use)'''
  
 
== Functions ==
 
== Functions ==
=== Function Categories ===
 
 
<div class="mw-collapsible mw-collapsed" style="border:1px solid #888888; padding:7px;>
 
<div class="mw-collapsible mw-collapsed" style="border:1px solid #888888; padding:7px;>
==== Exponentiation (2) ====
 
 
<div class="mw-collapsible-content">
 
<div class="mw-collapsible-content">
* Double pow(Double base, Double exponent)
 
* Double sqrt(Double value)
 
 
</div></div>
 
</div></div>
 +
 +
=== TpData===
 +
A data structure to manage teleport destinations that are set by a player positioned at the desired location.
 +
 
<div class="mw-collapsible mw-collapsed" style="border:1px solid #888888; padding:7px;>
 
<div class="mw-collapsible mw-collapsed" style="border:1px solid #888888; padding:7px;>
==== Rounding/Mapping (3) ====
+
==== Fields (6) ====
 
<div class="mw-collapsible-content">
 
<div class="mw-collapsible-content">
* Double abs(Double value)
+
* '''Double x''' : x-coordinate of the teleport destination
* Int floor(Double x)
+
* '''Double y''' : y-coordinate of the teleport destination
* Int ceil(Double x)
+
* '''Double z''' : z-coordinate of the teleport destination
 +
* '''Float yaw''' : yaw of the teleport destination
 +
* '''Float pitch''' : pitch of the teleport destination
 +
* '''String world''' : world of the teleport destination
 
</div></div>
 
</div></div>
<div class="mw-collapsible mw-collapsed" style="border:1px solid #888888; padding:7px;>
+
 
==== Random Number Generation (5) ====
+
<div class="mw-collapsible mw-collapsed" style="border:1px solid #888888; padding:7px;">
 +
==== Constructors (1) ====
 
<div class="mw-collapsible-content">
 
<div class="mw-collapsible-content">
'''Type-Bounded'''
+
* '''rtp::TpData(Player setter)''' : destination fields are set to match the ''setter''<nowiki>'</nowiki>s position at the time of initialization
* Int randomInt()
+
</div></div>
* Long randomLong()
 
* Float randomFloat()
 
* Double randomDouble()
 
  
'''User-Bounded'''
+
<div class="mw-collapsible mw-collapsed" style="border:1px solid #888888; padding:7px;">
* Double random(Double min, Double max)
+
==== Methods (3) ====
 +
<div class="mw-collapsible-content">
 +
* '''String string()''' : returns a simplified representation of the position held by the structure
 +
* '''String tpString()''' : returns a string representation of an anonymous tp call performed by tpHere
 +
* '''Void tpHere(Player player)''': teleports the ''player'' to the position held by the structure
 
</div></div>
 
</div></div>
<div class="mw-collapsible mw-collapsed" style="border:1px solid #888888; padding:7px;>
 
==== Trigonometry (14)====
 
<div class="mw-collapsible-content">
 
'''Conversions'''
 
* Double deg(Double x)
 
* Double rad(Double x)
 
  
'''Basic Functions (Degrees)'''
+
=== Rtp ===
* Double sin(Double x)
+
A TpData list selector and management tool that mimics the /rtp plugin functionality.
* Double cos(Double x)
 
* Double tan(Double x)
 
  
'''Inverse Functions (Degrees)'''
+
<div class="mw-collapsible mw-collapsed" style="border:1px solid #888888; padding:7px;">
* Double arcsin(Double x)
+
==== Fields (3) ====
* Double arccos(Double x)
+
<div class="mw-collapsible-content">
* Double arctan(Double x)
+
* '''String name''' : custom identifier for the set of teleport locations
 +
* '''Boolean doLogging''' : flag to enable logging of each use of teleportation
 +
* '''rtp::TpData[] tpList''' : list of potential teleport locations
 +
</div></div>
  
'''Basic Functions (Radians)'''
+
<div class="mw-collapsible mw-collapsed" style="border:1px solid #888888; padding:7px;">
* Double radsin(Double x)
+
==== Constructors (4) ====
* Double radcos(Double x)
+
<div class="mw-collapsible-content">
* Double radtan(Double x)
+
* '''rtp::Rtp()''' : initialize an empty location manager (defaults "UNNAMED", true)
 +
* '''rtp::Rtp(String name)''' : initialize a location manager with identifier name set
 +
* '''rtp::Rtp(Boolean doLogging)''' : initialize with logging option set
 +
* '''rtp::Rtp(String name, Boolean doLogging)''' : initialize with name and logging set
 +
</div></div>
  
'''Inverse Functions (Radians)'''
+
<div class="mw-collapsible mw-collapsed" style="border:1px solid #888888; padding:7px;">
* Double radarcsin(Double x)
+
==== Methods (8) ====
* Double radarccos(Double x)
+
<div class="mw-collapsible-content">
* Double radarctan(Double x)
+
* '''String string()''' : returns a representation of name, logging status, and capacity of the structure
 +
* '''Int count()''' : returns size of the managed location list
 +
* '''Void setName(String name)''' : updates the name of the structure
 +
* '''Void setLogging(Boolean doLogging)''' : updates the logging status of the structure
 +
* '''Void addWarp(Player setter)''' : adds a location generated from ''setter''<nowiki>'</nowiki>s position at the time of the function call
 +
* '''Void removeWarp(Int index)''' : removes a location specified by the ''index'' (between 1 and Rtp.count() inclusive)
 +
* '''Void useWarp(Player player, Int index)''' : warps the ''player'' to the location specified by ''index'' (1 to count() inclusive), performing optional logging
 +
* '''Void rtp(Player player)''' : Selects a location randomly and performs the actions of useWarp using the ''player''
 
</div></div>
 
</div></div>

Please note that all contributions to MINR.ORG WIKI may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see MINR.ORG WIKI:Copyrights for details). Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)