Skip to content

Commit

Permalink
treewide: Prepare for upcomming typst version
Browse files Browse the repository at this point in the history
  • Loading branch information
johannes-wolf committed Jan 2, 2025
1 parent 177a75c commit cbe5dad
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/coordinate.typ
Original file line number Diff line number Diff line change
Expand Up @@ -277,15 +277,15 @@
let types = c.map(type)
if len == 0 {
"previous"
} else if len in (2, 3) and types.all(t => t in ("integer", "float", "length")) {
} else if len in (2, 3) and types.all(t => t in (int, float, length)) {
"xyz"
} else if len == 2 and types.first() == "angle" {
} else if len == 2 and types.first() == angle {
"polar"
} else if len == 3 and c.at(1) in ("-|", "|-") {
"perpendicular"
} else if len in (3, 4) and types.at(1) in ("integer", "float", "length", "ratio") and (len == 3 or (len == 4 and types.at(2) == "angle")) {
} else if len in (3, 4) and types.at(1) in (int, float, length, ratio) and (len == 3 or (len == 4 and types.at(2) == angle)) {
"lerp"
} else if len >= 2 and types.first() == "function" {
} else if len >= 2 and types.first() == function {
"function"
}
} else if type(c) == str {
Expand Down
2 changes: 1 addition & 1 deletion src/deps.typ
Original file line number Diff line number Diff line change
@@ -1 +1 @@
#import "@preview/oxifmt:0.2.0"
#import "@preview/oxifmt:0.2.1"
2 changes: 1 addition & 1 deletion src/path-util.typ
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@
type(t) in (int, float, ratio),
message: "Distance t must be of type int, float or ratio"
)
let rev = if type(t) == ratio and t < 0% or type(t) in ("int", "float") and t < 0 {
let rev = if type(t) == ratio and t < 0% or type(t) in (int, float) and t < 0 {
true
} else {
false
Expand Down

0 comments on commit cbe5dad

Please sign in to comment.