View Source Geometry.PointM (Geometry v0.4.0)

A point struct, representing a 2D point with a measurement.

Link to this section Summary

Functions

Creates an empty PointM.

Creates a PointM from the given coordinate.

Creates a PointM from the given x, y, and m.

Link to this section Types

@type t() :: %Geometry.PointM{coordinate: Geometry.coordinate() | []}

Link to this section Functions

@spec new() :: t()

Creates an empty PointM.

examples

Examples

iex> PointM.new()
%PointM{coordinate: []}
@spec new(Geometry.coordinate()) :: t()

Creates a PointM from the given coordinate.

examples

Examples

iex> PointM.new([1.5, -2.1, 4])
%PointM{coordinate: [1.5, -2.1, 4]}
@spec new(number(), number(), number()) :: t()

Creates a PointM from the given x, y, and m.

examples

Examples

iex> PointM.new(-1.1, 2.2, 4)
%PointM{coordinate: [-1.1, 2.2, 4]}