From Test-Scratch-Wiki
Turn () Degrees | |
turn cw () degrees
| |
Category | Motion |
Type | Stack |
यह Turn () Degrees blocks ब्लॉक्स Motion blocks और Stack blocks है. ये ब्लॉक्स sprite स्प्राइट को clockwise या counter-clockwise बताई हुई डिग्री के कोण में घुमाते हैं (जैसे आपने चुना हो); यह स्प्राइट की दिशा direction बदलता है. यह ब्लॉक एक वर्तुल में 360 डिग्री घूम सकता है. इसका पूर्व निर्धारित मूल्य Default Value 15 डिग्रीज है और आप इसमें कोई भी अंक लिख सकते हो.
उदहारण
यह ब्लॉक्स स्प्राइट को गोल घुमाने का सरलतम मार्ग है.
Turn () Degrees ब्लॉक्स के आसान उदहारण:
- गोल घुमाव
— जैसे उपग्रह या पहिये
forever turn cw (15) degrees
- Animation
— e.g. a waving hand
repeat (5) turn cw (15) degrees end repeat (5) turn ccw (15) degrees end
- Vehicles that can turn
forever if <key (left arrow v) pressed?> then turn ccw (3) degrees end if <key (right arrow v) pressed?> then turn cw (3) degrees end
विकल्प
- Main article: List of Block Workarounds
The blocks can be replicated with the following code:
point in direction ((direction) + (amount))
point in direction ((direction) - (amount))