Math python module
From WiCWiki
|
math module
Types
Constants
- X_AXIS
- Indicates that the axis of rotation should be x in #GetRotationMatrix.
- Y_AXIS
- Indicates that the axis of rotation should be y in #GetRotationMatrix.
- Z_AXIS
- Indicates that the axis of rotation should be z in #GetRotationMatrix.
- PI
- The value of Pi used throughout the game. 3.141592653589793238
Functions
atan2
- Syntax
import wic wic.common.math.atan2( a, b )
- Description
- Returns the principal value of the arc tangent of a/b, expressed in radians.
- Exceptions
- TypeError
- Either a or b is not a float.
- See also
- #asin
asin
- Syntax
import wic wic.common.math.asin( x )
- Description
- Returns the principal value of the arc sine of x, expressed in radians.
- Exceptions
- TypeError
- x is not a float.
- See also
- #atan2
AngleDiff
- Syntax
import wic wic.common.math.AngleDiff( aDestination, aSource )
- Description
- Returns the angular difference between aSource and aDestination
- Exceptions
- TypeError
- Either aDestination or aSource is not a float.
- See also
- #MoveToAngle
- #CropAngle
MoveToAngle
- Syntax
import wic wic.common.math.MoveToAngle( aDestination, aSource, aMove )
- Description
- -
- Exceptions
- TypeError
- Either aDestination, aSource or aMove is not a float.
- See also
- #AngleDiff
- #CropAngle
CropAngle
- Syntax
import wic wic.common.math.CropAngle( anAngle )
- Description
- Crops anAngle into the 0.0 - 2.0 range.
- Exceptions
- TypeError
- anAngle is not a float.
- See also
- #AngleDiff
- #MoveToAngle
LinearPosition2D
- Syntax
import wic wic.common.math.LineraPosition2D( aTargetVector, aCurrentVector, aSpeed )
- Description
- -
- Exceptions
- TypeError
- aTargetVector or aCurrentVector is not Vector3s. Or aSpeed is not a float.
- See also
- -
GetRotationMatrix
- Syntax
import wic wic.common.math.GetRotationMatrix( anAxis, anAngle )
- Description
- -
- Exceptions
- TypeError
- Either anAxis isn't a proper axis constant or anAngle isn't a float.
- See also
- -
PolarAngleFromVector
- Syntax
import wic wic.common.math.PolarAngleFromVector( aVector )
- Description
- -
- Exceptions
- TypeError
- aVector isn't a Vector3.
- See also
- -
VectorToAngle
- Syntax
import wic wic.common.math.PolarAngleFromVector( aVector )
- Description
- -
- See also
- -