palosekwereYaBoleele
Returns the squared vector magnitude.
palosekwereYaBoleele(mola)Returns magnitude multiplied by itself without changing the vector. A (3, 4) vector returns 25. This avoids a square root when comparing distances.
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
mola | mola | The first vector. |
Examples
Section titled “Examples”tiro setaLoeto() {
thalaKanefase(320, 220);
bokamorago(235);
diri a = bopaMola(3, 4);
diri b = bopaMola(5, 1);
diri sephetho = palosekwereYaBoleele(a);
bogoloJwaMokwalo(28);
thalaMokwalo(mokwalo(sephetho), 40, 120);
emisaPoapoeletso();
}