ribegaMola
Reflects a vector about a surface.
ribegaMola(mola, oMongwe)Mutates and returns the first vector after reflecting it about a line in 2D or plane in 3D. Pass the surface normal, perpendicular to that surface. It need not have magnitude 1 and is not changed. A zero normal leaves the first vector unchanged.
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
mola | mola | The first vector. |
oMongwe | mola | The surface normal. |
Examples
Section titled “Examples”tiro setaLoeto() {
thalaKanefase(320, 220);
bokamorago(235);
diri a = bopaMola(3, 4);
diri b = bopaMola(5, 1);
diri sephetho = ribegaMola(a, bopaMola(0, 1));
atisaMola(sephetho, 20);
thalaMothalo(90, 60, 90 + sephetho.x, 60 + sephetho.y);
emisaPoapoeletso();
}