close panorama

# Vectormath Plugin vectormath.swffor Flashby Aldo Hoeben - fieldofview.com

## Description

This plugin provides a number of tigonometry and vector math methods.

vectormath.swf  (plugin only)

The vectormath sources and examples are available as part of the fovplugins package

fovplugins.zip  (plugin, source code & examples)

## Syntax / XML Usage Example

```<plugin name="vectormath"
url="vectormath.swf"
/>```

## Plugin Methods

sin(destVar, angle)
Sets destVar to the sine of 'angle'.
cos(destVar, angle)
Sets destVar to the cosine of 'angle'.
tan(destVar, angle)
Sets destVar to the tangens of 'angle'.
asin(destVar, number)
Sets destVar to the inverse sine of 'number'.
acos(destVar, number)
Sets destVar to the inverse cosine of 'number'.
atan(destVar, number)
Sets destVar to the inverse tangent of 'number'.
Sets destVar to the inverse tangent of 'opposite'/'adjacent'.
anglebetween(destVar, ath1, atv1, ath2, atv2)
Sets destVar to the angle between the two vectors defined by ('ath1', 'atv1') and ('ath2', 'atv2').
normal(destVarH, destVarV, ath1, atv1, ath2, atv2)
Sets destVarH and destVarV to align with the normal of the two vectors defined by ('ath1', 'atv1') and ('ath2', 'atv2').
rotatevector(destVarH, destVarV, destVarRotate, ath1, atv1, rotate1, ath2, atv2, rotate2)
Sets destVarH, destVarV and destVarRotate to align with the vector ('ath1', 'atv1', 'rotate1') after it has been rotated by ('ath2', 'atv2', 'rotate2').

Note that all parameters except destVar are taken as literals. If you want to pass the value of a variable or property, you have to use the get() function.

All angles are specified and returned in degrees, and axis rotations are done in the same order as in krpano.

## Example

 CLICK TO VIEW EXAMPLE