Skip to content

Commit

Permalink
Change vectors in book to use parens rather than brackets, to match s…
Browse files Browse the repository at this point in the history
…tack display
  • Loading branch information
Robotgiggle committed Feb 25, 2025
1 parent 39938c0 commit f7c5a49
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1722,7 +1722,7 @@
numvec: "Many mathematical operations function on both numbers and vectors. Such arguments are written as \"num|vec\".",

"add.1": "Perform addition.",
"add.2": "As such:$(li)With two numbers at the top of the stack, combines them into their sum.$(li)With a number and a vector, removes the number from the stack and adds it to each element of the vector.$(li)With two vectors, combines them by summing corresponding components into a new vector (i.e. [1, 2, 3] + [0, 4, -1] = [1, 6, 2]).",
"add.2": "As such:$(li)With two numbers at the top of the stack, combines them into their sum.$(li)With a number and a vector, removes the number from the stack and adds it to each element of the vector.$(li)With two vectors, combines them by summing corresponding components into a new vector (i.e. (1, 2, 3) + (0, 4, -1) = (1, 6, 2)).",

"sub.1": "Perform subtraction.",
"sub.2": "As such:$(li)With two numbers at the top of the stack, combines them into their difference.$(li)With a number and a vector, removes the number from the stack and subtracts it from each element of the vector.$(li)With two vectors, combines them by subtracting each component.$(br2)In all cases, the top of the stack or its components are subtracted $(italic)from/$ the second-from-the-top.",
Expand Down Expand Up @@ -1781,10 +1781,10 @@
"false": "Adds $(thing)False/$ to the top of the stack.",

"vec/": {
x: "The left-hand counter-clockwise pattern adds [1, 0, 0] to the stack; the right-hand clockwise pattern adds [-1, 0, 0].",
y: "The left-hand counter-clockwise pattern adds [0, 1, 0] to the stack; the right-hand clockwise pattern adds [0, -1, 0].",
z: "The left-hand counter-clockwise pattern adds [0, 0, 1]; the right-hand clockwise pattern adds [0, 0, -1].",
"0": "Adds [0, 0, 0] to the stack.",
x: "The left-hand counter-clockwise pattern adds (1, 0, 0) to the stack; the right-hand clockwise pattern adds (-1, 0, 0).",
y: "The left-hand counter-clockwise pattern adds (0, 1, 0) to the stack; the right-hand clockwise pattern adds (0, -1, 0).",
z: "The left-hand counter-clockwise pattern adds (0, 0, 1); the right-hand clockwise pattern adds (0, 0, -1).",
"0": "Adds (0, 0, 0) to the stack.",
},

"double/": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1558,7 +1558,7 @@
numvec: "Многие математические операции выполняются как над числами, так и над векторами. Такие аргументы записываются как \"num|vec\".",

"add.1": "Сложение.",
"add.2": "Как следует:$(li)С двумя числами в верхней части стека объединяет их в их сумму.$(li)С числом и вектором удаляет число из стека и добавляет его к каждому элементу вектора.$(li)С двумя векторами объединяет их, складывая соответствующие компоненты в новый вектор (т.е. [1, 2, 3] + [0, 4, -1] = [1, 6, 2]).",
"add.2": "Как следует:$(li)С двумя числами в верхней части стека объединяет их в их сумму.$(li)С числом и вектором удаляет число из стека и добавляет его к каждому элементу вектора.$(li)С двумя векторами объединяет их, складывая соответствующие компоненты в новый вектор (т.е. (1, 2, 3) + (0, 4, -1) = (1, 6, 2)).",

"sub.1": "Вычитание.",
"sub.2": "Как следует:$(li)С двумя числами в верхней части стека вычисляет их разность.$(li)С числом и вектором удаляет число из стека и вычитает его из каждого элемента вектора.$(li)С двумя векторами вычисляет их, вычитая каждую компоненту.$(br2)Во всех случаях верхняя часть стека или ее компоненты вычитаются $(italic)из/$ второй сверху.",
Expand Down Expand Up @@ -1617,10 +1617,10 @@
"false": "Добавляет $(thing)Ложь/$ в верхнюю часть стека.",

"vec/": {
x: "Левый противочасовой шаблон добавляет [1, 0, 0] в стек; правый по часовой стрелке шаблон добавляет [-1, 0, 0].",
y: "Левый противочасовой шаблон добавляет [0, 1, 0] в стек; правый по часовой стрелке шаблон добавляет [0, -1, 0].",
z: "Левый противочасовой шаблон добавляет [0, 0, 1]; правый по часовой стрелке шаблон добавляет [0, 0, -1].",
"0": "Добавляет [0, 0, 0] в стек.",
x: "Левый противочасовой шаблон добавляет (1, 0, 0) в стек; правый по часовой стрелке шаблон добавляет (-1, 0, 0).",
y: "Левый противочасовой шаблон добавляет (0, 1, 0) в стек; правый по часовой стрелке шаблон добавляет (0, -1, 0).",
z: "Левый противочасовой шаблон добавляет (0, 0, 1); правый по часовой стрелке шаблон добавляет (0, 0, -1).",
"0": "Добавляет (0, 0, 0) в стек.",
},

"double/": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1655,7 +1655,7 @@
numvec: "许多数学操作对数和向量都有效。这类参数记为“num vec”。",

"add.1": "执行加法。",
"add.2": "操作如下:$(li)若栈顶为两个数,返回其和。$(li)若为一个数和一个向量,移除该数并将向量的每个分量与其相加。$(li)若为两个向量,将对应分量相加(也即 [1, 2, 3] + [0, 4, -1] = [1, 6, 2])。",
"add.2": "操作如下:$(li)若栈顶为两个数,返回其和。$(li)若为一个数和一个向量,移除该数并将向量的每个分量与其相加。$(li)若为两个向量,将对应分量相加(也即 (1, 2, 3) + (0, 4, -1) = (1, 6, 2))。",

"sub.1": "执行减法。",
"sub.2": "操作如下:$(li)若栈顶为两个数,返回其差。$(li)若为一个数和一个向量,移除该数并将向量的每个分量与其相减。$(li)若为两个向量,将对应分量相减。$(br2)栈顶元素或其分量为减数,栈顶往下第二元素或其分量为被减数。",
Expand Down Expand Up @@ -1714,10 +1714,10 @@
"false": "返回 $(thing)False/$。",

"vec/": {
x: "左图(逆时针绘制)返回 [1, 0, 0];右图(顺时针绘制)返回 [-1, 0, 0]。",
y: "左图(逆时针绘制)返回 [0, 1, 0];右图(顺时针绘制)返回 [0, -1, 0]。",
z: "左图(逆时针绘制)返回 [0, 0, 1];右图(顺时针绘制)返回 [0, 0, -1]。",
"0": "返回 [0, 0, 0]。",
x: "左图(逆时针绘制)返回 (1, 0, 0);右图(顺时针绘制)返回 (-1, 0, 0)。",
y: "左图(逆时针绘制)返回 (0, 1, 0);右图(顺时针绘制)返回 (0, -1, 0)。",
z: "左图(逆时针绘制)返回 (0, 0, 1);右图(顺时针绘制)返回 (0, 0, -1)。",
"0": "返回 (0, 0, 0)。",
},

"double/": {
Expand Down

0 comments on commit f7c5a49

Please sign in to comment.