סקר מחקר: נשמח לשמוע על החוויה שלך עם Blockly
לפתיחת הסקר
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
blockly > utils > ניהול צוותים > תרגום
שיטת utils.Coordinate.translate()
מתרגם את הקואורדינטות האלה לפי ההיסטים הנתונים. בהתאמה.
Signature:
translate(tx: number, ty: number): Coordinate;
פרמטרים
פרמטר |
סוג |
תיאור |
tx |
number |
הערך שיש לתרגם לפי x. |
טי |
number |
הערך לתרגום ה-y. |
החזרות:
ניהול צוותים
הקואורדינטה הזו אחרי התרגום.
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2024-08-21 (שעון UTC).
[[["התוכן קל להבנה","easyToUnderstand","thumb-up"],["התוכן עזר לי לפתור בעיה","solvedMyProblem","thumb-up"],["סיבה אחרת","otherUp","thumb-up"]],[["חסרים לי מידע או פרטים","missingTheInformationINeed","thumb-down"],["התוכן מורכב מדי או עם יותר מדי שלבים","tooComplicatedTooManySteps","thumb-down"],["התוכן לא עדכני","outOfDate","thumb-down"],["בעיה בתרגום","translationIssue","thumb-down"],["בעיה בדוגמאות/בקוד","samplesCodeIssue","thumb-down"],["סיבה אחרת","otherDown","thumb-down"]],["עדכון אחרון: 2024-08-21 (שעון UTC)."],[[["The `utils.Coordinate.translate()` method modifies a coordinate by adding specified horizontal (tx) and vertical (ty) offsets."],["This method accepts two numeric arguments: `tx` for horizontal translation and `ty` for vertical translation."],["It returns the updated `Coordinate` object after applying the translations."]]],["The `translate()` method within the `Coordinate` class shifts a coordinate's position. It accepts two numerical parameters: `tx` and `ty`. `tx` determines the horizontal shift, while `ty` dictates the vertical shift. The method then returns a new `Coordinate` object reflecting the translated position. This effectively modifies the coordinate by the specified x and y offsets.\n"]]