DirectAnimation Animated Header --Static Methods Relevant to NumberBvr Objects DirectAnimation Animated Header --Static Methods Relevant to NumberBvr Objects* Microsoft DirectAnimation SDK
*Index  *Topic Contents
*Previous Topic: Static Fields Relevant to MontageBvr Objects
*Next Topic: Static Fields Relevant to NumberBvr Objects

Static Methods Relevant to NumberBvr Objects



abs

Statics Class

Creates a number behavior that represents the absolute value of the given number behavior. The behavior's value is equal to the absolute value (the non-negative equivalent) of the value of a.

public static NumberBvr abs(
  NumberBvr a
  );

Parameters
a
The NumberBvr object to apply the operation to.
Return Values

Returns the NumberBvr object.


acos

Statics Class

Creates a number behavior that represents the arccosine (inverse cosine) of the given behavior.

public static NumberBvr acos(
  NumberBvr a
  );

Parameters
a
The NumberBvr object. The value of the behavior is assumed to be a cosine value.
Return Values

Returns the NumberBvr object.

See Also

asin


add

Statics Class

Creates a number behavior representing the sum of the given number behaviors. The behavior's value is the value of a added to the value of b (a + b).

public static NumberBvr add(
  NumberBvr a,
  NumberBvr b
  );

Parameters
a and b
The NumberBvr objects to add.
Return Values

Returns the NumberBvrobject.


asin

Statics Class

Creates a number behavior that represents the arcsine (inverse sine) of the given behavior.

public static NumberBvr asin(
  NumberBvr a
  );

Parameters
a
The NumberBvr object. The value of the behavior is assumed to be a sine value.
Return Values

Returns the NumberBvr object.

See Also

acos


atan

Statics Class

Creates a number behavior that represents the arctangent (inverse tangent) of the given behavior.

public static NumberBvr atan(
  NumberBvr a
  );

Parameters
a
The NumberBvr object.
Return Values

Returns the NumberBvr object.

See Also

acos, asin, atan2


atan2

Statics Class

Creates a number behavior that represents the arctangent (inverse tangent) of the quotient of the given behaviors. The behavior's value is the inverse tangent of the value of a divided by the value of b.

public static NumberBvr atan2(
  NumberBvr a,
  NumberBvr b
  );

Parameters
a and b
The NumberBvr objects to divide.
Return Values

Returns the NumberBvr object.

See Also

acos, asin


bSpline

Statics Class

Creates a NumberBvr behavior based on a B-spline function. The function depends on the control elements, the knot vector, the mathematical degree, and the weights of the control elements (these are optional).

A B-spline function without weights is piecewise polynomial and with weights is piecewise rational (the quotient of two polynomials). It requires that:

numberOfControlElements = numberOfKnots - degree + 1

The control elements define the approximate direction and shape of the function. The knots represent junction values, in parameter space, between the connected polynomial parts.

Given a degree d and a number of knots k, the function is valid in the range knotd to knotk-d+1, and is otherwise undefined. For example, for a degree 2 curve, the valid range is from the second knot to the next to the last knot, inclusive.

The returned NumberBvr is the traversal of the spline function according to the evaluation parameter. The evaluation parameter is a NumberBvr that must be in the valid range of the spline, which is [knotd, knotk-d+1]. Any values outside this range are automatically clamped to the end values.

public static NumberBvr bSpline(
  int degree,
  NumberBvr[] knots,
  NumberBvr[] control_elements,
  NumberBvr[] weights,
  NumberBvr evaluation
  );

Parameters
degree
A number representing the mathematical degree of the B-spline to evaluate. Must be 1, 2, or 3.
knots
An array of NumberBvr objects representing the knots used to calculate the B-spline.
control_elements
An array of NumberBvr objects representing the control elements used to calculate the B-spline.
weights
An array of NumberBvr objects representing the weights used to calculate the rational B-spline. There must be the same number of weights as control elements. For non-rational B-splines, the value of weights is null.
evaluation
A NumberBvr object that controls the spline evaluation.
Return Values

Returns the NumberBvr object.


ceiling

Statics Class

Creates a number behavior that represents the ceiling value, the smallest integer value that is greater than or equal to the value of the given behavior.

public static NumberBvr ceiling(
  NumberBvr a
  );

Parameters
a
The NumberBvr object to find the ceiling for.
Return Values

Returns the NumberBvr object.


cos

Statics Class

Creates a number behavior that represents the cosine of the given behavior.

public static NumberBvr cos(
  NumberBvr a
  );

Parameters
a
The NumberBvr object. The value of the behavior is assumed to be in radians.
Return Values

Returns the NumberBvr object.

See Also

sin


degreesToRadians

Statics Class

Creates a number behavior that represents the value of the given behavior converted from degrees to radians.

public static NumberBvr degreesToRadians(
  NumberBvr a
  );

Parameters
a
The NumberBvr object to convert.
Return Values

Returns the NumberBvr object.


derivative

Statics Class

Creates a number behavior of the instantaneous derivative (rate of change) of the given number behavior. For example, a constant number yields a constant derivative of 0 and a value equal to "time" yields a constant derivative of 1.

public static NumberBvr derivative(
  NumberBvr a
  );

Parameters
a
The NumberBvr object for which to calculate the derivative.
Return Values

Returns the NumberBvr object.


div

Statics Class

Creates an number behavior representing the quotient of the given number behaviors. The behavior's value is the value of a divided by the value of b (a/b).

public static NumberBvr div(
  NumberBvr a,
  NumberBvr b
  );

Parameters
a and b
The NumberBvr objects to divide.
Return Values

Returns NumberBvr the object.


eq

Statics Class

Creates a boolean behavior that represents the relation a = b. The behavior's value is true when the value of a is equal to the value of b, otherwise, it is false.

public static BooleanBvr eq(
  NumberBvr a,
  NumberBvr b
  );

Parameters
a and b
The NumberBvr objects to compare.
Return Values

Returns the BooleanBvr object.


exp

Statics Class

Creates a number behavior that represents the exponential of the given behavior. The behavior's value is the base of natural logarithms, e, raised to the power of the value of a.

public static NumberBvr exp(
  NumberBvr a
  );

Parameters
a
The NumberBvr object to apply as an exponent of e.
Return Values

Returns the NumberBvr object.

See Also

ln


floor

Statics Class

Creates a number behavior that represents the floor value, the largest integer value that is less than or equal to the value of the given behavior.

public static NumberBvr floor(
  NumberBvr a
  );

Parameters
a
The NumberBvr object to find the floor for.
Return Values

Returns the NumberBvr object.


gt

Statics Class

Creates a boolean behavior that represents the relation a > b. The behavior's value is true when the value of a is greater than the value of b, otherwise, it is false.

public static BooleanBvr gt(
  NumberBvr a,
  NumberBvr b
  );

Parameters
a and b
The NumberBvr objects to compare.
Return Values

Returns the BooleanBvr object.


gte

Statics Class

Creates a boolean behavior that represents the relation a ³ b. The behavior's value is true when the value of a is greater than or equal to the value of b, otherwise, it is false.

public static BooleanBvr gte(
  NumberBvr a,
  NumberBvr b
  );

Parameters
a and b
The NumberBvr objects to compare.
Return Values

Returns the BooleanBvr object.


integral

Statics Class

Creates a number behavior that represents the sum of all values of a from the start time to the present.

public static NumberBvr integral(
  NumberBvr a
  );

Parameters
a
The NumberBvr object to integrate.
Return Values

Returns the NumberBvr object.


interpolate

Statics Class

Creates a NumberBvr object that moves along the interval in duration seconds. Velocity is constant.

public static NumberBvr interpolate(
  NumberBvr from,
  NumberBvr to,
  NumberBvr duration
  );

Parameters
from
The beginning NumberBvr object. This parameter can also be of type double.
to
The ending NumberBvr object. This parameter can also be of type double.
duration
The NumberBvr object representing the length of time, in seconds. This parameter can also be of type double.
Return Values

Returns the NumberBvr object.


ln

Statics Class

Creates a number behavior that represents the natural logarithm of the given behavior. The behavior's value is the value by which the base of natural logarithms, e, must be raised to equal the value of a.

public static NumberBvr ln(
  NumberBvr a
  );

Parameters
a
The NumberBvr object for which to calculate the natural logarithm.
Return Values

Returns the NumberBvr object.

See Also

exp


log10

Statics Class

Creates a number behavior that represents the common logarithm (base-10 logarithm) of the given behavior. The behavior's value is the value by which 10 must be raised to equal the value of a.

public static NumberBvr log10(
  NumberBvr a
  );

Parameters
a
The NumberBvr object for which to calculate the common logarithm.
Return Values

Returns the NumberBvr object.


lt

Statics Class

Creates a boolean behavior that represents the relation a < b. The behavior's value is true when the value of a is less than the value of b, otherwise, it is false.

public static BooleanBvr lt(
  NumberBvr a,
  NumberBvr b
  );

Parameters
a and b
The NumberBvr objects to compare.
Return Values

Returns the BooleanBvr object.


lte

Statics Class

Creates a boolean behavior that represents the relation a £ b. The behavior's value is true when the value of a is less than or equal to the value of b, otherwise, it is false.

public static BooleanBvr lte(
  NumberBvr a,
  NumberBvr b
  );

Parameters
a and b
The NumberBvr objects to compare.
Return Values

Returns the BooleanBvr object.


mod

Statics Class

Creates a number behavior that represents the modulus of the given behaviors. The behavior's value is the modulus, the remainder of the integer value of a divided by the integer value of b.

public static NumberBvr mod(
  NumberBvr a,
  NumberBvr b
  );

Parameters
a and b
The NumberBvr objects to calculate the modulus for.
Return Values

Returns the NumberBvr object.


mul

Statics Class

Creates a number behavior representing the product of the given number behaviors. The behavior's value is the value of a multiplied by the value of b (a ´ b).

public static NumberBvr mul(
  NumberBvr a,
  NumberBvr b
  );

Parameters
a and b
The NumberBvr objects to multiply.
Return Values

Returns the NumberBvr object.


ne

Statics Class

Creates a BooleanBvr behavior that represents the relation a != b. The behavior's value is true when the value of a is not equal to the value of b, otherwise, it is false.

public static BooleanBvr ne(
  NumberBvr a,
  NumberBvr b
  );

Parameters
a and b
The NumberBvr objects to compare.
Return Values

Returns the BooleanBvr object.


neg

Statics Class

Creates a number behavior representing the negation of the given number behavior. The behavior's value is equal to the value of a subtracted from zero (0 - a).

public static NumberBvr neg(
  NumberBvr a
  );

Parameters
a
The NumberBvr object to negate.
Return Values

Returns the NumberBvr object.


pow

Statics Class

Creates a number behavior representing a raised to the power of b. The behavior's value is equal to ab.

public static NumberBvr pow(
  NumberBvr a,
  NumberBvr b
  );

Parameters
a and b
The NumberBvr objects to apply the operation to.
Return Values

Returns the NumberBvr object.


radiansToDegrees

Statics Class

Creates a number behavior that represents the value of the given behavior converted from radians to degrees.

public static NumberBvr radiansToDegrees(
  NumberBvr a
  );

Parameters
a
The NumberBvr object to convert.
Return Values

Returns the NumberBvr object.


round

Statics Class

Creates a number behavior that represents the value of the given behavior, rounded to the nearest integer.

public static NumberBvr round(
  NumberBvr a
  );

Parameters
a
The NumberBvr object to be rounded.


seededRandom

Statics Class

Creates a number behavior that represents an infinite, time-varying sequence of pseudo-random values.

public static NumberBvr seededRandom(
  double seed
  );

Parameters
seed
The double that provides the seed, or starting value, for the sequence.
Return Values

Returns the NumberBvr object.


sin

Statics Class

Creates a number behavior that represents the sine of the given behavior.

public static NumberBvr sin(
  NumberBvr a
  );

Parameters
a
The NumberBvr object. The value of the behavior is assumed to be in radians.
Return Values

Returns the NumberBvr object.

See Also

cos


slowInSlowOut

Statics Class

Creates a NumberBvr object that moves along the interval in duration seconds. The animation is dampened so that the number increases slowly, hits a maximum speed at the midpoint, and then decelerates until the end is reached. The acceleration is specified in Gs, or multiples of the earth's gravitational constant.

public static NumberBvr slowInSlowOut(
  NumberBvr from,
  NumberBvr to,
  NumberBvr duration,
  NumberBvr acceleration
  );

Parameters
from
The NumberBvr object that is the beginning of the animation. This parameter can also be of type double.
to
The NumberBvr object that is the end of the animation. This parameter can also be of type double.
duration
The NumberBvr object that is the length of the animation, in seconds. This parameter can also be of type double.
acceleration
The NumberBvr object that is the rate of acceleration, in Gs. This parameter can also be of type double.
Return Values

Returns the NumberBvr object.


sqrt

Statics Class

Creates a number behavior that represents the square root of the given number behavior. The behavior's value is the square root of the value of a.

public static NumberBvr sqrt(
  NumberBvr a
  );

Parameters
a
The NumberBvr object to apply the square root operation to.
Return Values

Returns the NumberBvr object.


sub

Statics Class

Creates a number behavior representing the difference of the given number behaviors. The behavior's value is the value of b subtracted from a (a - b).

public static NumberBvr sub(
  NumberBvr a,
  NumberBvr b
  );

Parameters
a and b
The NumberBvr objects to subtract.
Return Values

Returns the NumberBvr object.


tan

Statics Class

Creates a number behavior that represents the tangent of the given behavior.

public static NumberBvr tan(
  NumberBvr a
  );

Parameters
a
The NumberBvr object. The value of the behavior is assumed to be in radians.
Return Values

Returns the NumberBvr object.

See Also

atan, cos, sin


toBvr

Statics Class

Converts a double floating-point number to a NumberBvr. The only time toBvr is used is when converting Java numbers, booleans, or strings to their corresponding DirectAnimation types. It is not used for constants such as red, yVector3, and origin2 because these are defined as constant behaviors.

public static NumberBvr toBvr(
  double a
  );

Parameters
a
The double floating-point number to be converted.
Return Values

Returns the NumberBvr object.

© 1998 Microsoft Corporation. All rights reserved. Terms of Use.

*Top of Page