MathObject MathObject MathObject MathObject Class

Definition

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.

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

public ref class MathObject : Microsoft::JScript::JSObject
public class MathObject : Microsoft.JScript.JSObject
type MathObject = class
    inherit JSObject
Public Class MathObject
Inherits JSObject
Inheritance
Derived

Fields

E E E E

Stores a value that represents Euler's constant, which is the base of the natural logarithm, specified by the constant e.

engine engine engine engine

Stores a reference to the scripting engine.

(Inherited from ScriptObject)
field_table field_table field_table field_table

Stores a list of fields that are dynamically added and removed from the object.

(Inherited from JSObject)
LN10 LN10 LN10 LN10

Stores a value that represents the logarithm base e of 10, the natural logarithm of 10.

LN2 LN2 LN2 LN2

Stores a value that represents the logarithm base e of 2, the natural logarithm of 2.

LOG10E LOG10E LOG10E LOG10E

Stores a value that represents the logarithm base 10 of e, the common logarithm of e.

LOG2E LOG2E LOG2E LOG2E

Stores a value that represents the logarithm base 2 of e, the binary logarithm of e.

parent parent parent parent

Stores a reference to the parent object.

(Inherited from ScriptObject)
PI PI PI PI

Stores a value that represents the ratio of the circumference of a circle to its diameter, specified by the constant π.

SQRT1_2 SQRT1_2 SQRT1_2 SQRT1_2

Stores a value that represents the following equivalent values: (√2)/2, √(½), and 1/(√2).

SQRT2 SQRT2 SQRT2 SQRT2

Stores a value that represents √2.

Methods

abs(Double) abs(Double) abs(Double) abs(Double)

Calculates the absolute value of the specified number.

acos(Double) acos(Double) acos(Double) acos(Double)

Calculates the inverse cosine of the specified number.

AddField(String) AddField(String) AddField(String) AddField(String)

Adds the specified field to the object.

(Inherited from JSObject)
asin(Double) asin(Double) asin(Double) asin(Double)

Calculates the inverse sine of the specified number.

atan(Double) atan(Double) atan(Double) atan(Double)

Calculates the inverse tangent of the specified number.

atan2(Double, Double) atan2(Double, Double) atan2(Double, Double) atan2(Double, Double)

Calculates the inverse tangent of the quotient of the specified numbers.

ceil(Double) ceil(Double) ceil(Double) ceil(Double)

Calculates the ceiling of the specified number, which is the smallest integer that is greater than or equal to the specified number.

cos(Double) cos(Double) cos(Double) cos(Double)

Calculates the cosine of the specified angle.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
exp(Double) exp(Double) exp(Double) exp(Double)

Calculates the number e to the raised specified power, where e is Euler's constant, the base of the natural logarithm.

floor(Double) floor(Double) floor(Double) floor(Double)

Calculates the floor of the specified number, which is the largest integer that is less than or equal to the specified number.

GetField(String, BindingFlags) GetField(String, BindingFlags) GetField(String, BindingFlags) GetField(String, BindingFlags)

Gets a field that has the specified name.

(Inherited from ScriptObject)
GetFields(BindingFlags) GetFields(BindingFlags) GetFields(BindingFlags) GetFields(BindingFlags)

Gets an array of FieldInfo objects that correspond to all fields of the current script object.

(Inherited from ScriptObject)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetMember(String, BindingFlags) GetMember(String, BindingFlags) GetMember(String, BindingFlags) GetMember(String, BindingFlags)

Gets an array of MemberInfo objects that correspond to all members that match the specified name.

(Inherited from JSObject)
GetMembers(BindingFlags) GetMembers(BindingFlags) GetMembers(BindingFlags) GetMembers(BindingFlags)

Gets an array of MemberInfo objects that correspond to all members of the current script object.

(Inherited from JSObject)
GetMethod(String, BindingFlags) GetMethod(String, BindingFlags) GetMethod(String, BindingFlags) GetMethod(String, BindingFlags)

Gets a method that has the specified name.

(Inherited from ScriptObject)
GetMethod(String, BindingFlags, Binder, Type[], ParameterModifier[]) GetMethod(String, BindingFlags, Binder, Type[], ParameterModifier[]) GetMethod(String, BindingFlags, Binder, Type[], ParameterModifier[]) GetMethod(String, BindingFlags, Binder, Type[], ParameterModifier[])

Gets a method that has the specified name by using the specified selection criteria.

(Inherited from ScriptObject)
GetMethods(BindingFlags) GetMethods(BindingFlags) GetMethods(BindingFlags) GetMethods(BindingFlags)

Gets an array of MethodInfo objects that correspond to all methods of the current script object.

(Inherited from ScriptObject)
GetParent() GetParent() GetParent() GetParent()

Gets a reference to the parent object.

(Inherited from ScriptObject)
GetProperties(BindingFlags) GetProperties(BindingFlags) GetProperties(BindingFlags) GetProperties(BindingFlags)

Gets an array of PropertyInfo objects that correspond to all properties of the current script object.

(Inherited from ScriptObject)
GetProperty(String, BindingFlags) GetProperty(String, BindingFlags) GetProperty(String, BindingFlags) GetProperty(String, BindingFlags)

Gets a property that has the specified name.

(Inherited from ScriptObject)
GetProperty(String, BindingFlags, Binder, Type, Type[], ParameterModifier[]) GetProperty(String, BindingFlags, Binder, Type, Type[], ParameterModifier[]) GetProperty(String, BindingFlags, Binder, Type, Type[], ParameterModifier[]) GetProperty(String, BindingFlags, Binder, Type, Type[], ParameterModifier[])

Gets a property that has the specified name by using the specified selection criteria.

(Inherited from ScriptObject)
GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
InvokeMember(String, BindingFlags, Binder, Object, Object[], ParameterModifier[], CultureInfo, String[]) InvokeMember(String, BindingFlags, Binder, Object, Object[], ParameterModifier[], CultureInfo, String[]) InvokeMember(String, BindingFlags, Binder, Object, Object[], ParameterModifier[], CultureInfo, String[]) InvokeMember(String, BindingFlags, Binder, Object, Object[], ParameterModifier[], CultureInfo, String[])

Invokes the specified member.

(Inherited from ScriptObject)
log(Double) log(Double) log(Double) log(Double)

Calculates the logarithm base e of the specified number, which is the natural logarithm of the specified number.

max(Object, Object, Object[]) max(Object, Object, Object[]) max(Object, Object, Object[]) max(Object, Object, Object[])

Returns the largest of two or more specified numbers.

MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
min(Object, Object, Object[]) min(Object, Object, Object[]) min(Object, Object, Object[]) min(Object, Object, Object[])

Returns the smallest of two or more specified numbers.

pow(Double, Double) pow(Double, Double) pow(Double, Double) pow(Double, Double)

Calculates the specified number raised to the specified power.

random() random() random() random()

Generates a random number between 0 and 1. This method does not generate a cryptographically secure random number.

round(Double) round(Double) round(Double) round(Double)

Rounds the specified number down or up to the nearest integer.

SetMemberValue2(String, Object) SetMemberValue2(String, Object) SetMemberValue2(String, Object) SetMemberValue2(String, Object)

Sets the value of a field that was dynamically added to the object and stored in field_table.

(Inherited from JSObject)
sin(Double) sin(Double) sin(Double) sin(Double)

Calculates the sine of the specified angle.

sqrt(Double) sqrt(Double) sqrt(Double) sqrt(Double)

Calculates the square root of the specified number.

tan(Double) tan(Double) tan(Double) tan(Double)

Calculates the tangent of the specified angle.

ToString() ToString() ToString() ToString()

Returns a string that represents the current object.

(Inherited from JSObject)

Explicit Interface Implementations

IEnumerable.GetEnumerator() IEnumerable.GetEnumerator() IEnumerable.GetEnumerator() IEnumerable.GetEnumerator()

Returns an enumerator that iterates through the members of the object.

(Inherited from JSObject)
IExpando.AddMethod(String, Delegate) IExpando.AddMethod(String, Delegate) IExpando.AddMethod(String, Delegate) IExpando.AddMethod(String, Delegate)

Adds the specified method to the object. IExpando.AddMethod(String, Delegate) is not implemented in JScript.

(Inherited from JSObject)
IExpando.AddProperty(String) IExpando.AddProperty(String) IExpando.AddProperty(String) IExpando.AddProperty(String)

Adds the specified property to the object. This method is not implemented in JScript.

(Inherited from JSObject)
IExpando.RemoveMember(MemberInfo) IExpando.RemoveMember(MemberInfo) IExpando.RemoveMember(MemberInfo) IExpando.RemoveMember(MemberInfo)

Removes the specified member from the object.

(Inherited from JSObject)

Properties

Item[Double] Item[Double] Item[Double] Item[Double]

Gets or sets a member of the script object that is designated by the specified Double index value.

(Inherited from ScriptObject)
Item[Int32] Item[Int32] Item[Int32] Item[Int32]

Gets or sets a member of the script object that is designated by the specified Int32 index value.

(Inherited from ScriptObject)
Item[Object[]] Item[Object[]] Item[Object[]] Item[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)
Item[String] Item[String] Item[String] Item[String]

Gets or sets a member of the script object that is designated by the specified name.

(Inherited from ScriptObject)
UnderlyingSystemType UnderlyingSystemType UnderlyingSystemType UnderlyingSystemType

Gets the type of the script object.

(Inherited from ScriptObject)

Extension Methods

Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable)

Casts the elements of an IEnumerable to the specified type.

OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable)

Filters the elements of an IEnumerable based on a specified type.

AsParallel(IEnumerable) AsParallel(IEnumerable) AsParallel(IEnumerable) AsParallel(IEnumerable)

Enables parallelization of a query.

AsQueryable(IEnumerable) AsQueryable(IEnumerable) AsQueryable(IEnumerable) AsQueryable(IEnumerable)

Converts an IEnumerable to an IQueryable.

Applies to