Skip to content
ExamplesOpen editor ↗

molaWaSekhutlo

Creates a vector from an angle.

molaWaSekhutlo(sekhutlo, [boleeleJwaOne])

Returns a new 2D vector at the supplied angle from the positive x-axis. Magnitude defaults to 1. The input is always in radians, including when seeloSaSekhutlo is DEGREES; the returned vector also rotates in radians.

NameTypeDescription
sekhutlopaloAngle in radians.
boleeleJwaOne (optional)paloMagnitude; defaults to 1.
Creates a vector from an angle
tiro setaLoeto() {
  thalaKanefase(320, 220);
  bokamorago(235);
  diri lebelo = molaWaSekhutlo(KOTARA_PI, 100);
  thalaMothalo(70, 50, 70 + lebelo.x, 50 + lebelo.y);
  emisaPoapoeletso();
}

bopaMola, dikolosaMola, radians