NumericScales

Description

Numerical scales for Pharo

Details

Source
GitHub
Dialect
pharo (25% confidence)
License
MIT
Created
Sept. 18, 2023
Updated
Sept. 18, 2023

Categories

Math

README excerpt

# Numeric Scales 
[![CI](https://github.com/pharo-graphics/NumericScales/actions/workflows/runTests.yml/badge.svg)](https://github.com/pharo-graphics/NumericScales/actions/workflows/runTests.yml)

Simple scales for numbers, points and colors.
NumericScales is an essential component used by [Roassal](https://github.com/pharo-graphics/Roassal).

  - [Installation](#installation)
  - [Quick start](#quick-start)
  - [Contact](#contact)


## Installation

Execute the following incantation in a Playground: 

```Smalltalk
Metacello new
	baseline: 'NumericScales';
	repository: 'github://pharo-graphics/NumericScales/src';
	load.
```

To add NumericScales to your baseline:

```Smalltalk
spec package: 'NumericScales'with: [ 
	spec repository: 'github://pharo-graphics/NumericScales/src' ].
```

## Quick start

The entry point is `NSScale` the package `NumericScales` contains a collection of Scales that you can use to your project, like: linear, log, pow, ordinal and polylinear.

```Smalltalk
scale := NSScale linear
	domain: { 0. 100};
	range: { 'red'. 'blue' }.
scale scale: 100.
"Color blue"

scale scale: 0.
"Color red"

scale scale: 50.
"Half way between red and blue"
```

## Documentation

You can find more information here  
* [User documentation](documentation/UserGuide.md) 
## Contact

If you have any questions or problems do not hesitate to open an issue.
← Back to results