Linear interpolation between two tensors.
(self, a: torch.Tensor, b: torch.Tensor, blend: torch.Tensor)
| 145 | ) |
| 146 | |
| 147 | def _lerp(self, a: torch.Tensor, b: torch.Tensor, blend: torch.Tensor) -> torch.Tensor: |
| 148 | """Linear interpolation between two tensors.""" |
| 149 | return a * (1 - blend) + b * blend |
| 150 | |
| 151 | def _slerp(self, a: torch.Tensor, b: torch.Tensor, blend: torch.Tensor) -> torch.Tensor: |
| 152 | """Spherical linear interpolation between two quaternions.""" |