C# 클래스 SGDE.Content.Code.Library.Math

The Math class contains methods and constants that represent common mathematical functions and values.
상속: Object
파일 보기 프로젝트 열기: sgdc/sgdc-old

공개 프로퍼티들

프로퍼티 타입 설명
E Number
LN10 Number
LN2 Number
LOG10E Number
LOG2E Number
PI Number
SQRT1_2 Number
SQRT2 Number

공개 메소드들

메소드 설명
abs ( Number val ) : Number

Computes and returns an absolute value for the number specified by the parameter val.

acos ( Number val ) : Number

Computes and returns the arc cosine of the number specified in the parameter val, in radians.

asin ( Number val ) : Number

Computes and returns the arc sine for the number specified in the parameter val, in radians.

atan ( Number val ) : Number

Computes and returns the value, in radians, of the angle whose tangent is specified in the parameter val.

atan2 ( Number y, Number x ) : Number

Computes and returns the angle of the point y/x in radians, when measured counterclockwise from a circle's x axis (where 0,0 represents the center of the circle).

ceil ( Number val ) : Number

Returns the ceiling of the specified number or expression.

cos ( Number angleRadians ) : Number

Computes and returns the cosine of the specified angle in radians.

exp ( Number val ) : Number

Returns the value of the base of the natural logarithm (e), to the power of the exponent specified in the parameter x.

floor ( Number val ) : Number

Returns the floor of the number or expression specified in the parameter val.

log ( Number val ) : Number

Returns the natural logarithm of the parameter val.

max ( Number val1, Number val2 ) : Number

Evaluates val1 and val2 (or more values) and returns the largest value.

min ( Number val1, Number val2 ) : Number

Evaluates val1 and val2 (or more values) and returns the smallest value.

pow ( Number @base, Number pow ) : Number

Computes and returns base to the power of pow.

random ( ) : Number

Returns a pseudo-random number n, where 0 >= n > 1.

round ( Number val ) : Number

Rounds the value of the parameter val up or down to the nearest integer and returns the value.

sin ( Number angleRadians ) : Number

Computes and returns the sine of the specified angle in radians.

sqrt ( Number val ) : Number

Computes and returns the square root of the specified number.

tan ( Number angleRadians ) : Number

Computes and returns the tangent of the specified angle.

메소드 상세

abs() 공개 정적인 메소드

Computes and returns an absolute value for the number specified by the parameter val.
public static abs ( Number val ) : Number
val Number The number whose absolute value is returned.
리턴 Number

acos() 공개 정적인 메소드

Computes and returns the arc cosine of the number specified in the parameter val, in radians.
public static acos ( Number val ) : Number
val Number A number from -1.0 to 1.0.
리턴 Number

asin() 공개 정적인 메소드

Computes and returns the arc sine for the number specified in the parameter val, in radians.
public static asin ( Number val ) : Number
val Number A number from -1.0 to 1.0.
리턴 Number

atan() 공개 정적인 메소드

Computes and returns the value, in radians, of the angle whose tangent is specified in the parameter val.
public static atan ( Number val ) : Number
val Number A number that represents the tangent of an angle.
리턴 Number

atan2() 공개 정적인 메소드

Computes and returns the angle of the point y/x in radians, when measured counterclockwise from a circle's x axis (where 0,0 represents the center of the circle).
public static atan2 ( Number y, Number x ) : Number
y Number The y coordinate of the point.
x Number The x coordinate of the point.
리턴 Number

ceil() 공개 정적인 메소드

Returns the ceiling of the specified number or expression.
public static ceil ( Number val ) : Number
val Number A number or expression.
리턴 Number

cos() 공개 정적인 메소드

Computes and returns the cosine of the specified angle in radians.
public static cos ( Number angleRadians ) : Number
angleRadians Number A number that represents an angle measured in radians.
리턴 Number

exp() 공개 정적인 메소드

Returns the value of the base of the natural logarithm (e), to the power of the exponent specified in the parameter x.
public static exp ( Number val ) : Number
val Number The exponent; a number or expression.
리턴 Number

floor() 공개 정적인 메소드

Returns the floor of the number or expression specified in the parameter val.
public static floor ( Number val ) : Number
val Number A number or expression.
리턴 Number

log() 공개 정적인 메소드

Returns the natural logarithm of the parameter val.
public static log ( Number val ) : Number
val Number A number or expression with a value greater than 0.
리턴 Number

max() 공개 정적인 메소드

Evaluates val1 and val2 (or more values) and returns the largest value.
public static max ( Number val1, Number val2 ) : Number
val1 Number A number or expression.
val2 Number A number or expression.
리턴 Number

min() 공개 정적인 메소드

Evaluates val1 and val2 (or more values) and returns the smallest value.
public static min ( Number val1, Number val2 ) : Number
val1 Number A number or expression.
val2 Number A number or expression.
리턴 Number

pow() 공개 정적인 메소드

Computes and returns base to the power of pow.
public static pow ( Number @base, Number pow ) : Number
@base Number
pow Number A number specifying the power that the parameter base is raised by.
리턴 Number

random() 공개 정적인 메소드

Returns a pseudo-random number n, where 0 >= n > 1.
public static random ( ) : Number
리턴 Number

round() 공개 정적인 메소드

Rounds the value of the parameter val up or down to the nearest integer and returns the value.
public static round ( Number val ) : Number
val Number The number to round.
리턴 Number

sin() 공개 정적인 메소드

Computes and returns the sine of the specified angle in radians.
public static sin ( Number angleRadians ) : Number
angleRadians Number A number that represents an angle measured in radians.
리턴 Number

sqrt() 공개 정적인 메소드

Computes and returns the square root of the specified number.
public static sqrt ( Number val ) : Number
val Number A number or expression greater than or equal to 0.
리턴 Number

tan() 공개 정적인 메소드

Computes and returns the tangent of the specified angle.
public static tan ( Number angleRadians ) : Number
angleRadians Number A number that represents an angle measured in radians.
리턴 Number

프로퍼티 상세

E 공개적으로 정적으로 프로퍼티

A mathematical constant for the base of natural logarithms, expressed as e.
public static Number E
리턴 Number

LN10 공개적으로 정적으로 프로퍼티

A mathematical constant for the natural logarithm of 10, expressed as loge10, with an approximate value of 2.302585092994046.
public static Number LN10
리턴 Number

LN2 공개적으로 정적으로 프로퍼티

A mathematical constant for the natural logarithm of 2, expressed as loge2, with an approximate value of 0.6931471805599453.
public static Number LN2
리턴 Number

LOG10E 공개적으로 정적으로 프로퍼티

A mathematical constant for the base-10 logarithm of the constant e (Math.E), expressed as log10e, with an approximate value of 0.4342944819032518.
public static Number LOG10E
리턴 Number

LOG2E 공개적으로 정적으로 프로퍼티

A mathematical constant for the base-2 logarithm of the constant e, expressed as log2e, with an approximate value of 1.442695040888963387.
public static Number LOG2E
리턴 Number

PI 공개적으로 정적으로 프로퍼티

A mathematical constant for the ratio of the circumference of a circle to its diameter, expressed as pi, with a value of 3.141592653589793.
public static Number PI
리턴 Number

SQRT1_2 공개적으로 정적으로 프로퍼티

A mathematical constant for the square root of one-half, with an approximate value of 0.7071067811865476.
public static Number SQRT1_2
리턴 Number

SQRT2 공개적으로 정적으로 프로퍼티

A mathematical constant for the square root of 2, with an approximate value of 1.4142135623730951.
public static Number SQRT2
리턴 Number