Thema: Math
Beiträge zum Thema "Math"
| Prototype: Math.precision [Flash 8]Wert auf Dezimalstellen runden
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//+ Math.precision (value, decimalPlaces)
//+
//+ returns the given value rounded to specified decimal places
//+++++++++++++++++++++++++++++ [...]
|
| Prototype: setSectionPoints [Flash 8]Tausender Punkte setzen
Math.setSectionPoints = function (z) {
var z1 = String(z).split(".");
if (z1.length <= 3) return z1.join(",");
var i_array = z1.split("").reverse();
var o_array = new Array();
o_array.push("," + z1);
var count = [...]
|
| Prototype: Math.vectorFaceNormal [Flash 8]Flächennormale errechnen
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//+ Math.vectorFaceNormal (Point1, Point2, Point3)
//+
//+ returns the face normal vector of a plane (or polygon, or face)
//+ described by three [...]
|
| Prototype: Math.vectorCross [Flash 8]Kreuzprodukt zweier Vektoren
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//+ Math.vectorCross (vector1, vector2)
//+
//+ returns the cross product of the given vectors, that´s another
//+ vector perpendicular to bot [...]
|
| Prototype: Math.vectorDistance [Flash 8]Distanz zwischen 2 Punkten berechnen
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//+ Math.vectorDistance (startPoint, endPoint)
//+
//+ returns the distance between two points
//++++++++++++++++++++++++++++++++++++++ [...]
|
| Prototype: Math.vectorAngle [Flash 8]Winkel zwischen Vektoren errechnen
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//+ Math.vectorAngle (vector1, vector2)
//+
//+ returns the angle between two vectors
//+++++++++++++++++++++++++++++++++++++++++++++++++ [...]
|
| Prototype: Math.vectorDot [Flash 8]Skalarprodukt zweier Vektoren
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//+ Math.vectorDot (vector1, vector2)
//+
//+ returns the dot product of the given vectors - in case of unit
//+ vectors that´s actually the [...]
|
| Prototype: Math.vectorNormalize [Flash 8]Vektor normalisieren
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//+ Math.vectorNormalize (vector)
//+
//+ returns the normalized vector (that is, a vector of 1 unit length
//+ pointing in the direction of the given [...]
|
| Prototype: Math.vectorLength [Flash 8]Vektorlänge berechnen
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//+ Math.vectorLength (vector)
//+
//+ returns the length of the vector
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Math [...]
|
| Prototype: Math.vectorDivide [Flash 8]Vektordivision
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//+ Math.vectorDivide (vector, factor)
//+
//+ returns the vector divided by factor (that is, scales the
//+ length of the vector)
//+++++++++++++++++++++++ [...]
|
| Prototype: Math.vectorMultiply [Flash 8]Vektormultiplikation
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//+ Math.vectorMultiply (vector, factor)
//+
//+ returns the vector multiplied by factor (that is, scales the
//+ length of the vector)
//++++++++++++ [...]
|
| Prototype: Math.vectorSubtract [Flash 8]Vektorsubtraktion
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//+ Math.vectorSubtract (startPoint, endPoint)
//+
//+ returns the vector (or path) from start point to end point
//++++++++++++++++++++++++++++++++++++++ [...]
|
| Prototype: Math.vectorAdd [Flash 8]Vektoraddition
/+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//+ Math.vectorAdd (startPoint, vector)
//+
//+ adds the vector to the start point and returns the resulting
//+ end point (or target point)
//++++++++++++++ [...]
|
| Prototype: Math.pow3 [Flash 8]Wert hoch drei (auch in Flash5)
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//+ Math.pow3 (value)
//+
//+ returns the 3rd power of given value like Math.pow(value, 3), but
//+ handles value<=0 in Flash5 where built-i [...]
|
| Prototype: Math.pow2 [Flash 8]Wert hoch zwei (auch in Flash5)
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//+ Math.pow2 (value)
//+
//+ returns the square of given value like Math.pow(value, 2), but
//+ handles value<=0 in Flash5 where built-in f [...]
|
| Prototype: Math.phi [Flash 8]goldenen Schnitt berechnen
Math.phi = function(sum){
var fak = (1 + Math.sqrt(5)) / 2;
var b = sum / fak ;
var a = b / fak;
var arr = ;
return arr;
}
//gibt die beiden Teile eines Wertes im Verhältnis des goldenen Schnittes
//zur [...]
|
| Prototype: Math.zufallZwischen [Flash 8]Zufallswert zwischen min/max
// Zufallswert von pmin bis pmax
Math.zufallZwischen = function(pmin, pmax) {
return (pmin + Math.floor(Math.random() * (pmax - pmin + 1)));
};
// Verwenden
trace(Math.zufallZwischen(-5, 5));
| |
Flashhilfe.de Flash Platform Tipps & Tutorials Flash Platform Andere Programmiersprachen Jobangebote Diskussionen
Flashhilfe News 
Regeln & Bedingungen
|