pub struct WasmSphericalSpace { /* private fields */ }Expand description
Spherical space operations for WASM
Implementations§
Source§impl WasmSphericalSpace
impl WasmSphericalSpace
Sourcepub fn ambient_dim(&self) -> usize
pub fn ambient_dim(&self) -> usize
Get ambient dimension
Sourcepub fn distance(&self, x: &[f64], y: &[f64]) -> Result<f64, JsError>
pub fn distance(&self, x: &[f64], y: &[f64]) -> Result<f64, JsError>
Geodesic distance on sphere
Sourcepub fn exp_map(&self, x: &[f64], v: &[f64]) -> Result<Vec<f64>, JsError>
pub fn exp_map(&self, x: &[f64], v: &[f64]) -> Result<Vec<f64>, JsError>
Exponential map: move from x in direction v
Sourcepub fn log_map(&self, x: &[f64], y: &[f64]) -> Result<Vec<f64>, JsError>
pub fn log_map(&self, x: &[f64], y: &[f64]) -> Result<Vec<f64>, JsError>
Logarithmic map: tangent vector at x pointing toward y
Trait Implementations§
Source§impl From<WasmSphericalSpace> for JsValue
impl From<WasmSphericalSpace> for JsValue
Source§fn from(value: WasmSphericalSpace) -> Self
fn from(value: WasmSphericalSpace) -> Self
Converts to this type from the input type.
Source§impl FromWasmAbi for WasmSphericalSpace
impl FromWasmAbi for WasmSphericalSpace
Source§impl IntoWasmAbi for WasmSphericalSpace
impl IntoWasmAbi for WasmSphericalSpace
Source§impl RefFromWasmAbi for WasmSphericalSpace
impl RefFromWasmAbi for WasmSphericalSpace
Source§type Anchor = RcRef<WasmSphericalSpace>
type Anchor = RcRef<WasmSphericalSpace>
The type that holds the reference to
Self for the duration of the
invocation of the function that has an &Self parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous.Source§impl TryFromJsValue for WasmSphericalSpace
impl TryFromJsValue for WasmSphericalSpace
Source§impl VectorFromWasmAbi for WasmSphericalSpace
impl VectorFromWasmAbi for WasmSphericalSpace
type Abi = <Box<[JsValue]> as FromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[WasmSphericalSpace]>
Source§impl VectorIntoWasmAbi for WasmSphericalSpace
impl VectorIntoWasmAbi for WasmSphericalSpace
type Abi = <Box<[JsValue]> as IntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[WasmSphericalSpace]>) -> Self::Abi
Source§impl WasmDescribeVector for WasmSphericalSpace
impl WasmDescribeVector for WasmSphericalSpace
impl SupportsConstructor for WasmSphericalSpace
impl SupportsInstanceProperty for WasmSphericalSpace
impl SupportsStaticProperty for WasmSphericalSpace
Auto Trait Implementations§
impl Freeze for WasmSphericalSpace
impl RefUnwindSafe for WasmSphericalSpace
impl Send for WasmSphericalSpace
impl Sync for WasmSphericalSpace
impl Unpin for WasmSphericalSpace
impl UnwindSafe for WasmSphericalSpace
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
Source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as
IntoWasmAbi::AbiSource§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
Same as
IntoWasmAbi::into_abi, except that it may throw and never
return in the case of Err.