public boolean isInSphere ( Vector origin , double radius ) { return ( NumberConversions . square ( origin . x - x ) + NumberConversions . square ( origin . y - y ) + NumberConversions . square ( origin . z - z ) ) <= NumberConversions . square ( radius ) ; }
Returns whether this vector is within a sphere .