Export (0) Print
Expand All

MathObject Class

This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.

Provides constants and static methods for trigonometric functions, logarithmic functions, and other common mathematical functions. This class belongs to the built-in object model category.

Namespace:  Microsoft.JScript
Assembly:  Microsoft.JScript (in Microsoft.JScript.dll)

public class MathObject : JSObject

The MathObject type exposes the following members.

  NameDescription
Public propertyItem[Double]Gets or sets a member of the script object that is designated by the specified Double index value. (Inherited from ScriptObject.)
Public propertyItem[Int32]Gets or sets a member of the script object that is designated by the specified Int32 index value. (Inherited from ScriptObject.)
Public propertyItem[Object[]]Gets or sets a member of the script object that is designated by the specified name, Double index value, or Int32 index value. (Inherited from ScriptObject.)
Public propertyItem[String]Gets or sets a member of the script object that is designated by the specified name. (Inherited from ScriptObject.)
Public propertyUnderlyingSystemTypeGets the type of the script object. (Inherited from ScriptObject.)
Top

  NameDescription
Public methodStatic memberabsCalculates the absolute value of the specified number.
Public methodStatic memberacosCalculates the inverse cosine of the specified number.
Public methodAddFieldAdds the specified field to the object. (Inherited from JSObject.)
Public methodStatic memberasinCalculates the inverse sine of the specified number.
Public methodStatic memberatanCalculates the inverse tangent of the specified number.
Public methodStatic memberatan2Calculates the inverse tangent of the quotient of the specified numbers.
Public methodStatic memberceilCalculates the ceiling of the specified number, which is the smallest integer that is greater than or equal to the specified number.
Public methodStatic membercosCalculates the cosine of the specified angle.
Public methodEquals(Object)Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public methodStatic memberexpCalculates the number e to the raised specified power, where e is Euler's constant, the base of the natural logarithm.
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodStatic memberfloorCalculates the floor of the specified number, which is the largest integer that is less than or equal to the specified number.
Public methodGetFieldGets a field that has the specified name. (Inherited from ScriptObject.)
Public methodGetFieldsGets an array of FieldInfo objects that correspond to all fields of the current script object. (Inherited from ScriptObject.)
Public methodGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodGetMemberGets an array of MemberInfo objects that correspond to all members that match the specified name. (Inherited from JSObject.)
Public methodGetMembersGets an array of MemberInfo objects that correspond to all members of the current script object. (Inherited from JSObject.)
Public methodGetMethod(String, BindingFlags)Gets a method that has the specified name. (Inherited from ScriptObject.)
Public methodGetMethod(String, BindingFlags, Binder, Type[], ParameterModifier[])Gets a method that has the specified name by using the specified selection criteria. (Inherited from ScriptObject.)
Public methodGetMethodsGets an array of MethodInfo objects that correspond to all methods of the current script object. (Inherited from ScriptObject.)
Public methodGetParentGets a reference to the parent object. (Inherited from ScriptObject.)
Public methodGetPropertiesGets an array of PropertyInfo objects that correspond to all properties of the current script object. (Inherited from ScriptObject.)
Public methodGetProperty(String, BindingFlags)Gets a property that has the specified name. (Inherited from ScriptObject.)
Public methodGetProperty(String, BindingFlags, Binder, Type, Type[], ParameterModifier[])Gets a property that has the specified name by using the specified selection criteria. (Inherited from ScriptObject.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodInvokeMemberInvokes the specified member. (Inherited from ScriptObject.)
Public methodStatic memberlogCalculates the logarithm base e of the specified number, which is the natural logarithm of the specified number.
Public methodStatic membermaxReturns the largest of two or more specified numbers.
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodStatic memberminReturns the smallest of two or more specified numbers.
Public methodStatic memberpowCalculates the specified number raised to the specified power.
Public methodStatic memberrandomGenerates a random number between 0 and 1. This method does not generate a cryptographically secure random number.
Public methodStatic memberroundRounds the specified number down or up to the nearest integer.
Public methodSetMemberValue2Sets the value of a field that was dynamically added to the object and stored in field_table. (Inherited from JSObject.)
Public methodStatic membersinCalculates the sine of the specified angle.
Public methodStatic membersqrtCalculates the square root of the specified number.
Public methodStatic membertanCalculates the tangent of the specified angle.
Public methodToStringReturns a string that represents the current object. (Inherited from JSObject.)
Top

  NameDescription
Public fieldStatic memberEStores a value that represents Euler's constant, which is the base of the natural logarithm, specified by the constant e.
Public fieldengineStores a reference to the scripting engine. (Inherited from ScriptObject.)
Protected fieldfield_tableStores a list of fields that are dynamically added and removed from the object. (Inherited from JSObject.)
Public fieldStatic memberLN10Stores a value that represents the logarithm base e of 10, the natural logarithm of 10.
Public fieldStatic memberLN2Stores a value that represents the logarithm base e of 2, the natural logarithm of 2.
Public fieldStatic memberLOG10EStores a value that represents the logarithm base 10 of e, the common logarithm of e.
Public fieldStatic memberLOG2EStores a value that represents the logarithm base 2 of e, the binary logarithm of e.
Protected fieldparentStores a reference to the parent object. (Inherited from ScriptObject.)
Public fieldStatic memberPIStores a value that represents the ratio of the circumference of a circle to its diameter, specified by the constant π.
Public fieldStatic memberSQRT1_2Stores a value that represents the following equivalent values: (√2)/2, √(½), and 1/(√2).
Public fieldStatic memberSQRT2Stores a value that represents √2.
Top

  NameDescription
Explicit interface implemetationPrivate methodIEnumerable.GetEnumeratorReturns an enumerator that iterates through the members of the object. (Inherited from JSObject.)
Explicit interface implemetationPrivate methodIExpando.AddMethodAdds the specified method to the object. IExpando.AddMethod is not implemented in JScript. (Inherited from JSObject.)
Explicit interface implemetationPrivate methodIExpando.AddPropertyAdds the specified property to the object. This method is not implemented in JScript. (Inherited from JSObject.)
Explicit interface implemetationPrivate methodIExpando.RemoveMemberRemoves the specified member from the object. (Inherited from JSObject.)
Top

.NET Framework

Supported in: 4.5, 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show:
© 2014 Microsoft