Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
blockly > utils > Coordinate > à grande échelle
Méthode utils.Coordinate.scale()
Met à l'échelle cette coordonnée selon le facteur de scaling donné.
Signature :
scale(s: number): Coordinate;
Paramètres
Paramètre |
Type |
Description |
s |
Nombre |
Facteur d'échelle à utiliser pour les dimensions X et Y. |
Renvoie :
Coordinate
Cette coordonnée après le scaling.
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2024/09/12 (UTC).
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Il n'y a pas l'information dont j'ai besoin","missingTheInformationINeed","thumb-down"],["Trop compliqué/Trop d'étapes","tooComplicatedTooManySteps","thumb-down"],["Obsolète","outOfDate","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Mauvais exemple/Erreur de code","samplesCodeIssue","thumb-down"],["Autre","otherDown","thumb-down"]],["Dernière mise à jour le 2024/09/12 (UTC)."],[[["The `scale()` method adjusts a Coordinate object's x and y values by multiplying them with a provided scale factor."],["It takes one argument: a numerical scale factor ( `s` ) applied to both x and y coordinates."],["The method returns the modified Coordinate object, allowing for method chaining."]]],["The `scale` method, part of the `Coordinate` class within the `utils` namespace, scales a coordinate. It accepts a single numerical parameter, `s`, which represents the scale factor applied to both the x and y dimensions. The method modifies the coordinate and returns the scaled `Coordinate` object. The `s` parameter determines how much larger or smaller the coordinate will become.\n"]]