MCPcopy Create free account
hub / github.com/google-deepmind/alphageometry / Ratio

Class Ratio

geometry.py:509–523  ·  view source on GitHub ↗

Node of type Ratio.

Source from the content-addressed store, hash-verified

507
508
509class Ratio(Node):
510 """Node of type Ratio."""
511
512 def new_val(self) -> Value:
513 return Value()
514
515 def set_lengths(self, l1: Length, l2: Length) -> None:
516 self._l = l1, l2
517
518 @property
519 def lengths(self) -> tuple[Length, Length]:
520 l1, l2 = self._l
521 if l1 is None or l2 is None:
522 return l1, l2
523 return l1.rep(), l2.rep()
524
525
526class Value(Node):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected