def select

bend-collections@1.0.0.0 · src/crypto/secp256k1/point.bend:103

import bend-collections@1.0.0.0/src/crypto/secp256k1/point.bend as Point
import Base
import bend-collections@1.0.0.0/src/crypto/secp256k1/field.bend as F

103# b ? p : q, coordinate-wise and branch-free, for b in {0, 1}
104def select(+b: Nat, p: Point, q: Point) -> Point:
105  match p q:
106    case Point{x1, y1, z1} Point{x2, y2, z2}:
107      Point{F.select(b, x1, x2), F.select(b, y1, y2), F.select(b, z1, z2)}

Uses (3)

Used by (1)