Tan

The   NWScript command returns the tangent of a float. That is, this command returns  for the endpoint   (in the Cartesian plane) of the line segment, originating at , of length 1 that forms an angle with the positive  -axis of size equal to the provided value, measured in degrees. (Thus, the returned value can be any real number.) For positive angles less than 90 degrees, this is equivalent to taking the ratio of the lengths of two sides of a right triangle with an angle of the indicated measure &mdash; specifically, the length of the leg opposite the angle divided by the length of the leg adjacent to the angle.

When calculating the tangent causes a division by zero (e.g. the tangent of 90 degrees), this function returns a very large number, presumably as a result of whatever approximation is being used behind the scenes.